@@ -157,7 +157,7 @@ |
||
| 157 | 157 | return $this->filterService->getUrlOfFilteredImage($asset_path, $filter_name); |
| 158 | 158 | } catch (\Imagine\Exception\RuntimeException $e) { |
| 159 | 159 | //If the filter fails, we can not serve the thumbnail and fall back to the original image and log an warning |
| 160 | - $this->logger->warning('Could not open thumbnail for attachment with ID ' . $attachment->getID() . ': ' . $e->getMessage()); |
|
| 160 | + $this->logger->warning('Could not open thumbnail for attachment with ID '.$attachment->getID().': '.$e->getMessage()); |
|
| 161 | 161 | return $this->assets->getUrl($asset_path); |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | protected function configureOptions(OptionsResolver $resolver): void |
| 107 | 107 | { |
| 108 | 108 | $resolver->setDefaults([ |
| 109 | - 'show_prefix' => static function (Options $options) { |
|
| 109 | + 'show_prefix' => static function(Options $options) { |
|
| 110 | 110 | if (null !== $options['measurement_unit']) { |
| 111 | 111 | /** @var MeasurementUnit $unit */ |
| 112 | 112 | $unit = $options['measurement_unit']; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | return false; |
| 118 | 118 | }, |
| 119 | - 'is_integer' => static function (Options $options) { |
|
| 119 | + 'is_integer' => static function(Options $options) { |
|
| 120 | 120 | if (null !== $options['measurement_unit']) { |
| 121 | 121 | /** @var MeasurementUnit $unit */ |
| 122 | 122 | $unit = $options['measurement_unit']; |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | return true; |
| 128 | 128 | }, |
| 129 | - 'unit' => static function (Options $options) { |
|
| 129 | + 'unit' => static function(Options $options) { |
|
| 130 | 130 | if (null !== $options['measurement_unit']) { |
| 131 | 131 | /** @var MeasurementUnit $unit */ |
| 132 | 132 | $unit = $options['measurement_unit']; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $resolver->setAllowedTypes('decimals', 'int'); |
| 146 | 146 | |
| 147 | - $resolver->setNormalizer('decimals', static function (Options $options, $value) { |
|
| 147 | + $resolver->setNormalizer('decimals', static function(Options $options, $value) { |
|
| 148 | 148 | // If the unit is integer based, then dont show any decimals |
| 149 | 149 | if ($options['is_integer']) { |
| 150 | 150 | return 0; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | { |
| 50 | 50 | return sprintf( |
| 51 | 51 | '<div class="markdown %s" data-markdown="%s" data-controller="common--markdown">%s</div>', |
| 52 | - $inline_mode ? 'markdown-inline' : '', //Add class if inline mode is enabled, to prevent margin after p |
|
| 52 | + $inline_mode ? 'markdown-inline' : '', //Add class if inline mode is enabled, to prevent margin after p |
|
| 53 | 53 | htmlspecialchars($markdown), |
| 54 | 54 | $this->translator->trans('markdown.loading') |
| 55 | 55 | ); |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | $native_connection = $connection->getNativeConnection(); |
| 42 | 42 | |
| 43 | 43 | //Ensure that the function really exists on the connection, as it is marked as experimental according to PHP documentation |
| 44 | - if($native_connection instanceof \PDO && method_exists($native_connection, 'sqliteCreateFunction' )) { |
|
| 45 | - $native_connection->sqliteCreateFunction('REGEXP', function ($pattern, $value) { |
|
| 44 | + if ($native_connection instanceof \PDO && method_exists($native_connection, 'sqliteCreateFunction')) { |
|
| 45 | + $native_connection->sqliteCreateFunction('REGEXP', function($pattern, $value) { |
|
| 46 | 46 | return (false !== mb_ereg($pattern, $value)) ? 1 : 0; |
| 47 | 47 | }); |
| 48 | 48 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public function connect(array $params): \Doctrine\DBAL\Driver\Connection |
| 33 | 33 | { |
| 34 | 34 | //Only set this on MySQL connections, as other databases don't support this parameter |
| 35 | - if($this->getDatabasePlatform() instanceof AbstractMySQLPlatform) { |
|
| 35 | + if ($this->getDatabasePlatform() instanceof AbstractMySQLPlatform) { |
|
| 36 | 36 | //1002 is \PDO::MYSQL_ATTR_INIT_COMMAND constant value |
| 37 | 37 | $params['driverOptions'][1002] = 'SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode, \'ONLY_FULL_GROUP_BY\', \'\'))'; |
| 38 | 38 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | unset($this->data[$permission][$operation]); |
| 166 | 166 | } else { |
| 167 | 167 | //Otherwise, set the pemission value |
| 168 | - if(!isset($this->data[$permission])) { |
|
| 168 | + if (!isset($this->data[$permission])) { |
|
| 169 | 169 | $this->data[$permission] = []; |
| 170 | 170 | } |
| 171 | 171 | $this->data[$permission][$operation] = $value; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | continue; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $ret[$permission] = array_filter($operations, function ($value) { |
|
| 219 | + $ret[$permission] = array_filter($operations, function($value) { |
|
| 220 | 220 | return $value !== null; |
| 221 | 221 | }); |
| 222 | 222 | |
@@ -704,7 +704,7 @@ |
||
| 704 | 704 | */ |
| 705 | 705 | public function isGoogleAuthenticatorEnabled(): bool |
| 706 | 706 | { |
| 707 | - return (bool)$this->googleAuthenticatorSecret; |
|
| 707 | + return (bool) $this->googleAuthenticatorSecret; |
|
| 708 | 708 | } |
| 709 | 709 | |
| 710 | 710 | /** |
@@ -290,7 +290,7 @@ |
||
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | //Check that the number of mountnames is the same as the (rounded) quantity |
| 293 | - if (!empty($this->mountnames) && count($uniq_mountnames) !== (int) round ($this->quantity)) { |
|
| 293 | + if (!empty($this->mountnames) && count($uniq_mountnames) !== (int) round($this->quantity)) { |
|
| 294 | 294 | $context->buildViolation('project.bom_entry.mountnames_quantity_mismatch') |
| 295 | 295 | ->atPath('mountnames') |
| 296 | 296 | ->addViolation(); |
@@ -104,8 +104,8 @@ |
||
| 104 | 104 | { |
| 105 | 105 | //If needed hide the obsolete entries |
| 106 | 106 | if ($hide_obsolete) { |
| 107 | - return $this->orderdetails->filter(function (Orderdetail $orderdetail) { |
|
| 108 | - return ! $orderdetail->getObsolete(); |
|
| 107 | + return $this->orderdetails->filter(function(Orderdetail $orderdetail) { |
|
| 108 | + return !$orderdetail->getObsolete(); |
|
| 109 | 109 | }); |
| 110 | 110 | } |
| 111 | 111 | |