mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 06:40:33 -04:00
Remove closing tags from pure PHP files
This commit is contained in:
parent
0cd89eb10c
commit
def275ab3c
21 changed files with 2 additions and 20 deletions
|
@ -109,6 +109,8 @@ Before submitting design contributions, please discuss them with the Standard Eb
|
|||
preg_replace('|</foo>|ius', '</bar>', $text);
|
||||
````
|
||||
|
||||
- Omit closing PHP tags in files that are pure PHP.
|
||||
|
||||
- Language constructs that can optionally have curly braces (like `if`) should always have curly braces.
|
||||
|
||||
Good:
|
||||
|
|
|
@ -8,4 +8,3 @@ class Collection{
|
|||
$this->Url = '/collections/' . strtolower(str_replace(' ', '-', Formatter::ToPlainText(Formatter::RemoveDiacritics($this->Name)))) . '/';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -33,4 +33,3 @@ const REPOS_PATH = SITE_ROOT . '/ebooks';
|
|||
const GITHUB_SECRET_FILE_PATH = SITE_ROOT . '/config/secrets/se-vcs-bot@github.com'; // Set in the GitHub organization global webhook settings.
|
||||
const GITHUB_WEBHOOK_LOG_FILE_PATH = '/var/log/local/webhooks-github.log'; // Must be writable by `www-data` Unix user.
|
||||
const GITHUB_IGNORED_REPOS = ['tools', 'manual', 'web']; // If we get GitHub push requests featuring these repos, silently ignore instead of returning an error.
|
||||
?>
|
||||
|
|
|
@ -16,4 +16,3 @@ class Contributor{
|
|||
$this->MarcRole = $marcRole;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -24,4 +24,3 @@ set_exception_handler(function($ex){
|
|||
|
||||
throw $ex; // Send the exception back to PHP for its usual logging routine.
|
||||
});
|
||||
?>
|
||||
|
|
|
@ -23,4 +23,3 @@ function vds($var){
|
|||
ob_end_clean();
|
||||
return $str;
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -536,4 +536,3 @@ class Ebook{
|
|||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?
|
||||
class EbookParsingException extends \Exception{
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -8,4 +8,3 @@ class EbookSource{
|
|||
$this->Url = $url;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -36,4 +36,3 @@ class Formatter{
|
|||
return htmlspecialchars(trim($text), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -8,4 +8,3 @@ class GitCommit{
|
|||
$this->Message = $message;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -79,4 +79,3 @@ class HttpInput{
|
|||
return $default;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?
|
||||
class InvalidAuthorException extends \Exception{
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?
|
||||
class InvalidEbookException extends \Exception{
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -191,4 +191,3 @@ class Library{
|
|||
return $matches;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -22,4 +22,3 @@ class Logger{
|
|||
error_log($text);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?
|
||||
class NoopException extends \Exception{
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -7,4 +7,3 @@ class SeeOtherEbookException extends \Exception{
|
|||
parent::__construct('This ebook is at a different URL: ' . $url);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -8,4 +8,3 @@ class Tag{
|
|||
$this->Url = '/tags/' . strtolower(str_replace(' ', '-', Formatter::ToPlainText($this->Name))) . '/';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -37,4 +37,3 @@ class Template{
|
|||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -7,4 +7,3 @@ class WebhookException extends \Exception{
|
|||
parent::__construct($message);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue