Passed
Pull Request — master (#210)
by
unknown
05:27
created
src/Services/Trees/NodesListBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $secure_class_name = str_replace('\\', '_', $class_name);
62 62
         $key = 'list_'.$this->keyGenerator->generateKey().'_'.$secure_class_name.$parent_id;
63 63
 
64
-        return $this->cache->get($key, function (ItemInterface $item) use ($class_name, $parent, $secure_class_name) {
64
+        return $this->cache->get($key, function(ItemInterface $item) use ($class_name, $parent, $secure_class_name) {
65 65
             // Invalidate when groups, a element with the class or the user changes
66 66
             $item->tag(['groups', 'tree_list', $this->keyGenerator->generateKey(), $secure_class_name]);
67 67
             /** @var StructuralDBElementRepository $repo */
Please login to merge, or discard this patch.
src/Services/Trees/StructuralElementRecursionHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
     {
102 102
         $em = $this->em;
103 103
 
104
-        $this->execute($element, static function (AbstractStructuralDBElement $element) use ($em): void {
104
+        $this->execute($element, static function(AbstractStructuralDBElement $element) use ($em): void {
105 105
             $em->remove($element);
106 106
         });
107 107
 
Please login to merge, or discard this patch.
src/Services/Trees/TreeViewGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -173,17 +173,17 @@  discard block
 block discarded – undo
173 173
         $icon = "fa-fw fa-treeview fa-solid ";
174 174
         switch ($class) {
175 175
             case Category::class:
176
-                return $icon . 'fa-tags';
176
+                return $icon.'fa-tags';
177 177
             case Storelocation::class:
178
-                return $icon . 'fa-cube';
178
+                return $icon.'fa-cube';
179 179
             case Footprint::class:
180
-                return $icon . 'fa-microchip';
180
+                return $icon.'fa-microchip';
181 181
             case Manufacturer::class:
182
-                return $icon . 'fa-industry';
182
+                return $icon.'fa-industry';
183 183
             case Supplier::class:
184
-                return $icon . 'fa-truck';
184
+                return $icon.'fa-truck';
185 185
             case Project::class:
186
-                return $icon . 'fa-archive';
186
+                return $icon.'fa-archive';
187 187
             default:
188 188
                 return null;
189 189
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $secure_class_name = str_replace('\\', '_', $class);
220 220
         $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name;
221 221
 
222
-        return $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) {
222
+        return $this->cache->get($key, function(ItemInterface $item) use ($repo, $parent, $secure_class_name) {
223 223
             // Invalidate when groups, a element with the class or the user changes
224 224
             $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]);
225 225
 
Please login to merge, or discard this patch.
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.