Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 14:24:37 +01:00
parent f53923f16c
commit f52675068b
151 changed files with 251 additions and 403 deletions

View File

@@ -114,7 +114,7 @@ class General extends AbstractExtension
return 'fa-file-o';
case 'application/pdf':
return 'fa-file-pdf-o';
/* image */
/* image */
case 'image/png':
case 'image/jpeg':
case 'image/svg+xml':
@@ -122,7 +122,7 @@ class General extends AbstractExtension
case 'image/heic-sequence':
case 'application/vnd.oasis.opendocument.image':
return 'fa-file-image-o';
/* MS word */
/* MS word */
case 'application/msword':
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.template':
@@ -137,7 +137,7 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.text-web':
case 'application/vnd.oasis.opendocument.text-master':
return 'fa-file-word-o';
/* MS excel */
/* MS excel */
case 'application/vnd.ms-excel':
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.template':
@@ -147,7 +147,7 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.spreadsheet':
case 'application/vnd.oasis.opendocument.spreadsheet-template':
return 'fa-file-excel-o';
/* MS powerpoint */
/* MS powerpoint */
case 'application/vnd.ms-powerpoint':
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
case 'application/vnd.openxmlformats-officedocument.presentationml.template':
@@ -158,7 +158,7 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.presentation':
case 'application/vnd.oasis.opendocument.presentation-template':
return 'fa-file-powerpoint-o';
/* calc */
/* calc */
case 'application/vnd.sun.xml.draw':
case 'application/vnd.sun.xml.draw.template':
case 'application/vnd.stardivision.draw':
@@ -171,7 +171,6 @@ class General extends AbstractExtension
case 'application/vnd.oasis.opendocument.formula':
case 'application/vnd.oasis.opendocument.database':
return 'fa-calculator';
}
},
['is_safe' => ['html']]
@@ -184,9 +183,8 @@ class General extends AbstractExtension
protected function markdown(): TwigFilter
{
return new TwigFilter(
'markdown',
'markdown',
static function (string $text): string {
$converter = new GithubFlavoredMarkdownConverter(
[
'allow_unsafe_links' => false,
@@ -196,7 +194,8 @@ class General extends AbstractExtension
);
return (string) $converter->convert($text);
}, ['is_safe' => ['html']]
},
['is_safe' => ['html']]
);
}