Passed
Branch master (350f1b)
by Jan
04:53
created
src/DataTables/AttachmentDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $dataTable->add('picture', TextColumn::class, [
63 63
             'label' => '',
64
-            'render' => function ($value, Attachment $context) {
64
+            'render' => function($value, Attachment $context) {
65 65
                 if ($context->isPicture()
66
-                    && ! $context->isExternal()
66
+                    && !$context->isExternal()
67 67
                     && $this->attachmentHelper->isFileExisting($context)) {
68 68
                     return sprintf(
69 69
                         '<img alt="%s" src="%s" data-thumbnail="%s" class="%s">',
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $dataTable->add('name', TextColumn::class, [
82 82
             'label' => 'attachment.edit.name',
83
-            'render' => function ($value, Attachment $context) {
83
+            'render' => function($value, Attachment $context) {
84 84
                 //Link to external source
85 85
                 if ($context->isExternal()) {
86 86
                     return sprintf(
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $dataTable->add('attachment_type', TextColumn::class, [
106 106
             'label' => 'attachment.table.type',
107 107
             'field' => 'attachment_type.name',
108
-            'render' => function ($value, Attachment $context) {
108
+            'render' => function($value, Attachment $context) {
109 109
                 return sprintf(
110 110
                     '<a href="%s">%s</a>',
111 111
                     $this->entityURLGenerator->editURL($context->getAttachmentType()),
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $dataTable->add('element', TextColumn::class, [
118 118
             'label' => 'attachment.table.element',
119 119
             //'propertyPath' => 'element.name',
120
-            'render' => function ($value, Attachment $context) {
120
+            'render' => function($value, Attachment $context) {
121 121
                 return sprintf(
122 122
                     '<a href="%s">%s</a>',
123 123
                     $this->entityURLGenerator->infoURL($context->getElement()),
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $dataTable->add('filesize', TextColumn::class, [
135 135
             'label' => $this->translator->trans('attachment.table.filesize'),
136
-            'render' => function ($value, Attachment $context) {
136
+            'render' => function($value, Attachment $context) {
137 137
                 if ($this->attachmentHelper->isFileExisting($context)) {
138 138
                     return $this->attachmentHelper->getHumanFileSize($context);
139 139
                 }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
         $dataTable->createAdapter(ORMAdapter::class, [
199 199
             'entity' => Attachment::class,
200
-            'query' => function (QueryBuilder $builder): void {
200
+            'query' => function(QueryBuilder $builder): void {
201 201
                 $this->getQuery($builder);
202 202
             },
203 203
         ]);
Please login to merge, or discard this patch.
src/Services/TranslationExtractor/PermissionExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function extract($resource, MessageCatalogue $catalogue): void
52 52
     {
53
-        if (! $this->finished) {
53
+        if (!$this->finished) {
54 54
             //Extract for every group...
55 55
             foreach ($this->permission_structure['groups'] as $group) {
56 56
                 if (isset($group['label'])) {
Please login to merge, or discard this patch.
src/Services/PermissionResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function listOperationsForPermission(string $permission): array
157 157
     {
158
-        if (! $this->isValidPermission($permission)) {
158
+        if (!$this->isValidPermission($permission)) {
159 159
             throw new \InvalidArgumentException(sprintf('A permission with that name is not existing! Got %s.', $permission));
160 160
         }
161 161
         $operations = $this->permission_structure['perms'][$permission]['operations'];
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $cache = new ConfigCache($this->cache_file, $this->is_debug);
195 195
 
196 196
         //Check if the cache is fresh, else regenerate it.
197
-        if (! $cache->isFresh()) {
197
+        if (!$cache->isFresh()) {
198 198
             $permission_file = __DIR__.'/../../config/permissions.yaml';
199 199
 
200 200
             //Read the permission config file...
Please login to merge, or discard this patch.
src/Services/Trees/NodesListBuilder.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
         $secure_class_name = str_replace('\\', '_', $class_name);
64 64
         $key = 'list_'.$this->keyGenerator->generateKey().'_'.$secure_class_name.$parent_id;
65 65
 
66
-        return $this->cache->get($key, function (ItemInterface $item) use ($class_name, $parent, $secure_class_name) {
66
+        return $this->cache->get($key, function(ItemInterface $item) use ($class_name, $parent, $secure_class_name) {
67 67
             // Invalidate when groups, a element with the class or the user changes
68 68
             $item->tag(['groups', 'tree_list', $this->keyGenerator->generateKey(), $secure_class_name]);
69 69
             /** @var StructuralDBElementRepository */
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/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.