@@ -105,7 +105,7 @@ |
||
105 | 105 | */ |
106 | 106 | public function getThumbnailURL(Attachment $attachment, string $filter_name = 'thumbnail_sm'): string |
107 | 107 | { |
108 | - if (! $attachment->isPicture()) { |
|
108 | + if (!$attachment->isPicture()) { |
|
109 | 109 | throw new \InvalidArgumentException('Thumbnail creation only works for picture attachments!'); |
110 | 110 | } |
111 | 111 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public function getListOfRessources(): array |
54 | 54 | { |
55 | 55 | try { |
56 | - return $this->cache->get('attachment_builtin_ressources', function () { |
|
56 | + return $this->cache->get('attachment_builtin_ressources', function() { |
|
57 | 57 | $results = []; |
58 | 58 | |
59 | 59 | $finder = new Finder(); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | protected function configureOptions(OptionsResolver $resolver): void |
136 | 136 | { |
137 | 137 | $resolver->setDefaults([ |
138 | - 'limit' => 15, //Given only 15 entries |
|
138 | + 'limit' => 15, //Given only 15 entries |
|
139 | 139 | //'allowed_extensions' => [], //Filter the filenames. For example ['jpg', 'jpeg'] to only get jpegs. |
140 | 140 | //'placeholders' => Attachment::BUILTIN_PLACEHOLDER, //By default use all builtin ressources, |
141 | 141 | 'empty_returns_all' => false, //Return the whole list of ressources when empty keyword is given |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function format($value, ?MeasurementUnit $unit = null, array $options = []) |
54 | 54 | { |
55 | - if (! is_numeric($value)) { |
|
55 | + if (!is_numeric($value)) { |
|
56 | 56 | throw new \InvalidArgumentException('$value must be an numeric value!'); |
57 | 57 | } |
58 | 58 | $value = (float) $value; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | //Otherwise just output it |
77 | - if (! empty($options['unit'])) { |
|
77 | + if (!empty($options['unit'])) { |
|
78 | 78 | $format_string = '%.'.$options['decimals'].'f '.$options['unit']; |
79 | 79 | } else { //Dont add space after number if no unit was specified |
80 | 80 | $format_string = '%.'.$options['decimals'].'f'; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | protected function configureOptions(OptionsResolver $resolver): void |
87 | 87 | { |
88 | 88 | $resolver->setDefaults([ |
89 | - 'show_prefix' => function (Options $options) { |
|
89 | + 'show_prefix' => function(Options $options) { |
|
90 | 90 | if (null !== $options['measurement_unit']) { |
91 | 91 | /** @var MeasurementUnit $unit */ |
92 | 92 | $unit = $options['measurement_unit']; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | return false; |
98 | 98 | }, |
99 | - 'is_integer' => function (Options $options) { |
|
99 | + 'is_integer' => function(Options $options) { |
|
100 | 100 | if (null !== $options['measurement_unit']) { |
101 | 101 | /** @var MeasurementUnit $unit */ |
102 | 102 | $unit = $options['measurement_unit']; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | return true; |
108 | 108 | }, |
109 | - 'unit' => function (Options $options) { |
|
109 | + 'unit' => function(Options $options) { |
|
110 | 110 | if (null !== $options['measurement_unit']) { |
111 | 111 | /** @var MeasurementUnit $unit */ |
112 | 112 | $unit = $options['measurement_unit']; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $resolver->setAllowedTypes('decimals', 'int'); |
124 | 124 | |
125 | - $resolver->setNormalizer('decimals', function (Options $options, $value) { |
|
125 | + $resolver->setNormalizer('decimals', function(Options $options, $value) { |
|
126 | 126 | // If the unit is integer based, then dont show any decimals |
127 | 127 | if ($options['is_integer']) { |
128 | 128 | return 0; |
@@ -51,7 +51,7 @@ |
||
51 | 51 | public function format($value, ?Currency $currency = null, $decimals = 5, bool $show_all_digits = false) |
52 | 52 | { |
53 | 53 | $iso_code = $this->base_currency; |
54 | - if (null !== $currency && ! empty($currency->getIsoCode())) { |
|
54 | + if (null !== $currency && !empty($currency->getIsoCode())) { |
|
55 | 55 | $iso_code = $currency->getIsoCode(); |
56 | 56 | } |
57 | 57 |
@@ -102,7 +102,7 @@ |
||
102 | 102 | |
103 | 103 | $continue = $io->confirm(sprintf('Found %d abandoned files. Do you want to delete them? This can not be undone!', \count($file_list)), false); |
104 | 104 | |
105 | - if (! $continue) { |
|
105 | + if (!$continue) { |
|
106 | 106 | //We are finished here, when no files should be deleted |
107 | 107 | return; |
108 | 108 | } |
@@ -91,7 +91,7 @@ |
||
91 | 91 | $repo = $this->em->getRepository(Currency::class); |
92 | 92 | $candidates = []; |
93 | 93 | |
94 | - if (! empty($iso_code)) { |
|
94 | + if (!empty($iso_code)) { |
|
95 | 95 | $candidates = $repo->findBy(['iso_code' => $iso_code]); |
96 | 96 | } else { |
97 | 97 | $candidates = $repo->findAll(); |
@@ -78,14 +78,14 @@ |
||
78 | 78 | sprintf('You are going to change the password of %s with ID %d. Proceed?', |
79 | 79 | $user->getFullName(true), $user->getID())); |
80 | 80 | |
81 | - if (! $proceed) { |
|
81 | + if (!$proceed) { |
|
82 | 82 | return; |
83 | 83 | } |
84 | 84 | |
85 | 85 | $success = false; |
86 | 86 | $new_password = ''; |
87 | 87 | |
88 | - while (! $success) { |
|
88 | + while (!$success) { |
|
89 | 89 | $pw1 = $io->askHidden('Please enter new password:'); |
90 | 90 | $pw2 = $io->askHidden('Please confirm:'); |
91 | 91 | if ($pw1 !== $pw2) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | //Retrieve bbcode from entity |
139 | 139 | $bbcode = $this->propertyAccessor->getValue($result, $property); |
140 | 140 | //Check if the current property really contains BBCode |
141 | - if (! preg_match(static::BBCODE_REGEX, $bbcode)) { |
|
141 | + if (!preg_match(static::BBCODE_REGEX, $bbcode)) { |
|
142 | 142 | continue; |
143 | 143 | } |
144 | 144 | $io->writeln( |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | //If we are not in dry run, save changes to DB |
162 | - if (! $input->getOption('dry-run')) { |
|
162 | + if (!$input->getOption('dry-run')) { |
|
163 | 163 | $this->em->flush(); |
164 | 164 | $io->success('Changes saved to DB successfully!'); |
165 | 165 | } |
@@ -137,7 +137,7 @@ |
||
137 | 137 | public function useFloatAmount(): bool |
138 | 138 | { |
139 | 139 | if ($this->partUnit instanceof MeasurementUnit) { |
140 | - return ! $this->partUnit->isInteger(); |
|
140 | + return !$this->partUnit->isInteger(); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | //When no part unit is set, treat it as part count, and so use the integer value. |