Passed
Push — master ( 0663a0...89258b )
by Jan
04:32
created
src/Services/Attachments/FileTypeFilterTools.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 $element = 'audio/*';
129 129
             } elseif (!preg_match('/^[-\w.]+\/[-\w.*]+/', $element) && strpos($element, '.') !== 0) {
130 130
                 //Convert jpg to .jpg
131
-                $element = '.' . $element;
131
+                $element = '.'.$element;
132 132
             }
133 133
 
134 134
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $filter = trim($filter);
149 149
 
150
-        return $this->cache->get('filter_exts_' . md5($filter), function (ItemInterface $item) use ($filter) {
150
+        return $this->cache->get('filter_exts_'.md5($filter), function(ItemInterface $item) use ($filter) {
151 151
             $elements = explode(',', $filter);
152 152
             $extensions = [];
153 153
 
Please login to merge, or discard this patch.
src/Form/Part/PartBaseType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
                 'empty_data' => "",
125 125
                 'attr' => [
126 126
                     'class' => 'tagsinput',
127
-                    'data-autocomplete' => $this->urlGenerator->generate('typeahead_tags', ['query' => 'QUERY']),],
127
+                    'data-autocomplete' => $this->urlGenerator->generate('typeahead_tags', ['query' => 'QUERY']), ],
128 128
                 'disabled' => !$this->security->isGranted('tags.edit', $part)
129 129
             ]);
130 130
 
Please login to merge, or discard this patch.
src/Controller/TypeaheadController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $normalizers = [
52 52
             new ObjectNormalizer()
53 53
         ];
54
-        $encoders =  [
54
+        $encoders = [
55 55
             new JsonEncoder()
56 56
         ];
57 57
         $serializer = new Serializer($normalizers, $encoders);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $normalizers = [
70 70
             new ObjectNormalizer()
71 71
         ];
72
-        $encoders =  [
72
+        $encoders = [
73 73
             new JsonEncoder()
74 74
         ];
75 75
         $serializer = new Serializer($normalizers, $encoders);
Please login to merge, or discard this patch.
src/Services/TagFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function searchTags(string $keyword, array $options = [])
59 59
     {
60 60
         $results = [];
61
-        $keyword_regex = '/^' . preg_quote($keyword, '/') . '/';
61
+        $keyword_regex = '/^'.preg_quote($keyword, '/').'/';
62 62
 
63 63
         $resolver = new OptionsResolver();
64 64
         $this->configureOptions($resolver);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             ->where("p.tags LIKE ?1")
79 79
             ->setMaxResults($options['query_limit'])
80 80
             //->orderBy('RAND()')
81
-            ->setParameter(1, '%' . $keyword . '%');
81
+            ->setParameter(1, '%'.$keyword.'%');
82 82
 
83 83
         $possible_tags = $qb->getQuery()->getArrayResult();
84 84
 
Please login to merge, or discard this patch.
src/Services/UserCacheKeyGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@
 block discarded – undo
60 60
         //If the user is null, then treat it as anonymous user.
61 61
         //When the anonymous user is passed as user then use this path too.
62 62
         if ($user === null || $user->getID() === User::ID_ANONYMOUS) {
63
-            return 'user$_' . User::ID_ANONYMOUS;
63
+            return 'user$_'.User::ID_ANONYMOUS;
64 64
         }
65 65
 
66 66
         //In the most cases we can just use the username (its unique)
67
-        return "user_" . $user->getUsername() . '_' . $locale;
67
+        return "user_".$user->getUsername().'_'.$locale;
68 68
     }
69 69
 }
70 70
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/PricedetailHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             } else {
67 67
                 // We have to sort the pricedetails manually
68 68
                 $array = $pricedetails->map(
69
-                    function (Pricedetail $pricedetail) {
69
+                    function(Pricedetail $pricedetail) {
70 70
                         return $pricedetail->getMinDiscountQuantity();
71 71
                     }
72 72
                 )->toArray();
Please login to merge, or discard this patch.
src/Entity/Attachments/Attachment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 
384 384
     public function setElement(AttachmentContainingDBElement $element) : Attachment
385 385
     {
386
-        if (!is_a($element,static::ALLOWED_ELEMENT_CLASS)) {
386
+        if (!is_a($element, static::ALLOWED_ELEMENT_CLASS)) {
387 387
             throw new \InvalidArgumentException(sprintf(
388 388
                 'The element associated with a %s must be a %s!',
389 389
                 get_class($this),
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
         if ($only_http) {   //Check if scheme is HTTPS or HTTP
472 472
             $scheme = parse_url($string, PHP_URL_SCHEME);
473 473
             if ($scheme !== 'http' && $scheme !== 'https') {
474
-                return false;   //All other schemes are not valid.
474
+                return false; //All other schemes are not valid.
475 475
             }
476 476
         }
477 477
         if ($path_required) {
Please login to merge, or discard this patch.
src/Entity/Attachments/AttachmentTypeAttachment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,5 +40,5 @@
 block discarded – undo
40 40
      */
41 41
     protected $element;
42 42
 
43
-    public const ALLOWED_ELEMENT_CLASS =  AttachmentType::class;
43
+    public const ALLOWED_ELEMENT_CLASS = AttachmentType::class;
44 44
 }
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entity/PriceInformations/Pricedetail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function getPriceRelatedQuantity(): float
182 182
     {
183
-        if ($this->orderdetail  && $this->orderdetail->getPart() && !$this->orderdetail->getPart()->useFloatAmount()) {
183
+        if ($this->orderdetail && $this->orderdetail->getPart() && !$this->orderdetail->getPart()->useFloatAmount()) {
184 184
             $tmp = round($this->price_related_quantity);
185 185
             return $tmp < 1 ? 1 : $tmp;
186 186
         }
@@ -322,6 +322,6 @@  discard block
 block discarded – undo
322 322
      */
323 323
     public function getIDString(): string
324 324
     {
325
-        return 'PD' . sprintf('%06d', $this->getID());
325
+        return 'PD'.sprintf('%06d', $this->getID());
326 326
     }
327 327
 }
Please login to merge, or discard this patch.