Fixed code style.

This commit is contained in:
Jan Böhmer 2020-08-21 21:36:22 +02:00
parent 2853e471c4
commit d0b1024d80
212 changed files with 495 additions and 1005 deletions

View file

@ -135,8 +135,6 @@ class AppExtension extends AbstractExtension
/**
* This function/filter generates an path.
*
* @return string
*/
public function loginPath(string $path): string
{

View file

@ -20,7 +20,6 @@
namespace App\Twig;
use Com\Tecnick\Barcode\Barcode;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
@ -30,11 +29,12 @@ class BarcodeExtension extends AbstractExtension
public function getFilters()
{
return [
new TwigFilter('barcodeSVG', function (string $content, string $type = "QRCODE") {
new TwigFilter('barcodeSVG', function (string $content, string $type = 'QRCODE') {
$barcodeFactory = new Barcode();
$barcode = $barcodeFactory->getBarcodeObj($type, $content);
return $barcode->getSvgCode();
}),
];
}
}
}

View file

@ -77,19 +77,19 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface
public function checkSecurity($tags, $filters, $functions): void
{
foreach ($tags as $tag) {
if (! \in_array($tag, $this->allowedTags, true)) {
if (!\in_array($tag, $this->allowedTags, true)) {
throw new SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag);
}
}
foreach ($filters as $filter) {
if (! \in_array($filter, $this->allowedFilters, true)) {
if (!\in_array($filter, $this->allowedFilters, true)) {
throw new SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter);
}
}
foreach ($functions as $function) {
if (! \in_array($function, $this->allowedFunctions, true)) {
if (!\in_array($function, $this->allowedFunctions, true)) {
throw new SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function);
}
}
@ -114,7 +114,7 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface
}
}
if (! $allowed) {
if (!$allowed) {
$class = \get_class($obj);
throw new SecurityNotAllowedMethodError(sprintf('Calling "%s" method on a "%s" object is not allowed.', $method, $class), $class, $method);
@ -135,7 +135,7 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface
}
}
if (! $allowed) {
if (!$allowed) {
$class = \get_class($obj);
throw new SecurityNotAllowedPropertyError(sprintf('Calling "%s" property on a "%s" object is not allowed.', $property, $class), $class, $property);

View file

@ -1,9 +1,7 @@
<?php
namespace App\Twig;
use App\Services\ElementTypeNameGenerator;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
@ -24,4 +22,4 @@ final class TypeLabelExtension extends AbstractExtension
new TwigFunction('elementTypeName', [$this->nameGenerator, 'getTypeNameCombination']),
];
}
}
}