Merge pull request #769 from BookStackApp/psr-2-fixes

PSR2 fixes after running `./vendor/bin/phpcbf`
This commit is contained in:
Abijeet Patro 2018-03-28 01:09:09 +05:30 committed by GitHub
commit b99229a5c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -201,5 +201,4 @@ class Entity extends Ownable
{
return '/';
}
}

View file

@ -774,7 +774,9 @@ class EntityRepo
$scriptSearchRegex = '/<script.*?>.*?<\/script>/ms';
$matches = [];
preg_match_all($scriptSearchRegex, $html, $matches);
if (count($matches) === 0) return $html;
if (count($matches) === 0) {
return $html;
}
foreach ($matches[0] as $match) {
$html = str_replace($match, htmlentities($match), $html);

View file

@ -192,7 +192,8 @@ class ImageService extends UploadService
* @param Image $image
* @return boolean
*/
protected function isGif(Image $image) {
protected function isGif(Image $image)
{
return strtolower(pathinfo($this->getPath($image), PATHINFO_EXTENSION)) === 'gif';
}