Passed
Pull Request — master (#14)
by
unknown
20:34 queued 16:25
created
src/Services/Trees/TreeViewGenerator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
                 $item->setSelected(true);
97 97
             }
98 98
 
99
-            if (! empty($item->getNodes())) {
99
+            if (!empty($item->getNodes())) {
100 100
                 $item->addTag((string) \count($item->getNodes()));
101 101
             }
102 102
 
103
-            if (! empty($href_type)) {
103
+            if (!empty($href_type)) {
104 104
                 $entity = $this->em->getPartialReference($class, $item->getId());
105 105
                 $item->setHref($this->urlGenerator->getURL($entity, $href_type));
106 106
             }
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function getGenericTree(string $class, ?StructuralDBElement $parent = null): array
123 123
     {
124
-        if (! is_a($class, NamedDBElement::class, true)) {
124
+        if (!is_a($class, NamedDBElement::class, true)) {
125 125
             throw new \InvalidArgumentException('$class must be a class string that implements StructuralDBElement or NamedDBElement!');
126 126
         }
127
-        if (null !== $parent && ! is_a($parent, $class)) {
127
+        if (null !== $parent && !is_a($parent, $class)) {
128 128
             throw new \InvalidArgumentException('$parent must be of the type $class!');
129 129
         }
130 130
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $secure_class_name = str_replace('\\', '_', $class);
140 140
         $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name;
141 141
 
142
-        return $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) {
142
+        return $this->cache->get($key, function(ItemInterface $item) use ($repo, $parent, $secure_class_name) {
143 143
             // Invalidate when groups, a element with the class or the user changes
144 144
             $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]);
145 145
 
Please login to merge, or discard this patch.
src/Services/PasswordResetManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $expiration_date->add(date_interval_create_from_date_string('1 day'));
74 74
         $user->setPwResetExpires($expiration_date);
75 75
 
76
-        if (! empty($user->getEmail())) {
76
+        if (!empty($user->getEmail())) {
77 77
             $address = new Address($user->getEmail(), $user->getFullName());
78 78
             $mail = new TemplatedEmail();
79 79
             $mail->to($address);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         }
122 122
 
123 123
         //Check if token is valid
124
-        if (! $this->passwordEncoder->isPasswordValid($user->getPwResetToken(), $token, null)) {
124
+        if (!$this->passwordEncoder->isPasswordValid($user->getPwResetToken(), $token, null)) {
125 125
             return false;
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/Services/Attachments/BuiltinAttachmentsFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Services/MoneyFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Command/UpdateExchangeRatesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Command/SetPasswordCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,14 +78,14 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Command/ConvertBBCodeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Entity/Parts/PartTraits/InstockTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
src/Entity/Parts/PartTraits/OrderTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
         }
189 189
 
190 190
         foreach ($all_orderdetails as $orderdetails) {
191
-            if (! $orderdetails->getObsolete()) {
191
+            if (!$orderdetails->getObsolete()) {
192 192
                 return false;
193 193
             }
194 194
         }
Please login to merge, or discard this patch.