Passed
Push — master ( 2259c5...50e852 )
by Jan
05:34
created
src/Services/Trees/SidebarTreeUpdater.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      */
44 44
     public function getLastTreeUpdate(): \DateTimeInterface
45 45
     {
46
-        return $this->cache->get(self::CACHE_KEY, function (ItemInterface $item) {
46
+        return $this->cache->get(self::CACHE_KEY, function(ItemInterface $item) {
47 47
             $item->expiresAfter(self::TTL);
48 48
 
49 49
             //This tag and therfore this whole cache gets cleared by TreeCacheInvalidationListener when a structural element is changed
Please login to merge, or discard this patch.
src/Services/LogSystem/LogEntryExtraFormatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 $context->getOldStock(),
187 187
                 '<i class="fa-solid fa-right-long"></i>',
188 188
                 $context->getNewStock(),
189
-                ($context->getNewStock() > $context->getOldStock() ? '+' : '-'). $context->getChangeAmount(),
189
+                ($context->getNewStock() > $context->getOldStock() ? '+' : '-').$context->getChangeAmount(),
190 190
             );
191 191
             if (!empty($context->getComment())) {
192 192
                 $array['log.part_stock_changed.comment'] = htmlspecialchars($context->getComment());
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             if ($context->getInstockChangeType() === PartStockChangedLogEntry::TYPE_MOVE) {
195 195
                 $array['log.part_stock_changed.move_target'] =
196 196
                     $this->elementTypeNameGenerator->getLocalizedTypeLabel(PartLot::class)
197
-                    .' ' . $context->getMoveToTargetID();
197
+                    .' '.$context->getMoveToTargetID();
198 198
             }
199 199
         }
200 200
 
Please login to merge, or discard this patch.
src/Services/LabelSystem/BarcodeGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     {
64 64
         $svg = $this->generateSVG($options, $target);
65 65
         $base64 = $this->dataUri($svg, 'image/svg+xml');
66
-        return '<img src="'.$base64.'" width="100%" style="min-height: 25px;" alt="'. $this->getContent($options, $target) . '" />';
66
+        return '<img src="'.$base64.'" width="100%" style="min-height: 25px;" alt="'.$this->getContent($options, $target).'" />';
67 67
     }
68 68
 
69 69
      /**
Please login to merge, or discard this patch.
src/Services/LabelSystem/LabelTextReplacer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     public function replace(string $lines, object $target): string
90 90
     {
91 91
         $patterns = [
92
-            '/(\[\[[A-Z_0-9]+\]\])/' => function ($match) use ($target) {
92
+            '/(\[\[[A-Z_0-9]+\]\])/' => function($match) use ($target) {
93 93
                 return $this->handlePlaceholder($match[0], $target);
94 94
             },
95 95
         ];
Please login to merge, or discard this patch.
src/Services/Attachments/BuiltinAttachmentsFinder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 
61 61
         $output = [];
62 62
 
63
-        foreach($finder as $file) {
63
+        foreach ($finder as $file) {
64 64
             $folder = $file->getRelativePath();
65 65
             //Normalize path (replace \ with /)
66 66
             $folder = str_replace('\\', '/', $folder);
67 67
 
68
-            if(!isset($output[$folder])) {
68
+            if (!isset($output[$folder])) {
69 69
                 $output[$folder] = [];
70 70
             }
71 71
             //Add file to group
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function getListOfRessources(): array
86 86
     {
87 87
         try {
88
-            return $this->cache->get('attachment_builtin_ressources', function () {
88
+            return $this->cache->get('attachment_builtin_ressources', function() {
89 89
                 $results = [];
90 90
 
91 91
                 $finder = new Finder();
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     protected function configureOptions(OptionsResolver $resolver): void
168 168
     {
169 169
         $resolver->setDefaults([
170
-            'limit' => 15,  //Given only 15 entries
170
+            'limit' => 15, //Given only 15 entries
171 171
             //'allowed_extensions' => [], //Filter the filenames. For example ['jpg', 'jpeg'] to only get jpegs.
172 172
             //'placeholders' => Attachment::BUILTIN_PLACEHOLDER, //By default use all builtin ressources,
173 173
             'empty_returns_all' => false, //Return the whole list of ressources when empty keyword is given
Please login to merge, or discard this patch.
src/Services/Attachments/AttachmentSubmitHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
 
232 232
 
233 233
         //Check if the extension is blacklisted and replace the file extension with txt if needed
234
-        if(in_array($ext, self::BLACKLISTED_EXTENSIONS)) {
234
+        if (in_array($ext, self::BLACKLISTED_EXTENSIONS)) {
235 235
             $new_path = $this->generateAttachmentPath($attachment, $attachment->isSecure())
236 236
             .DIRECTORY_SEPARATOR.$this->generateAttachmentFilename($attachment, 'txt');
237 237
 
Please login to merge, or discard this patch.
src/Services/Attachments/AttachmentURLGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Services/Formatters/AmountFormatter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Services/Formatters/MarkdownParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.