Completed
Push — master ( b27079...448d5b )
by Jan
26s queued 12s
created
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
     public function buildForm(FormBuilderInterface $builder, array $options): void
65 65
     {
66 66
         $builder->addModelTransformer(new CallbackTransformer(
67
-            function ($value) use ($options) {
67
+            function($value) use ($options) {
68 68
                 return $this->transform($value, $options);
69
-            }, function ($value) use ($options) {
69
+            }, function($value) use ($options) {
70 70
                 return $this->reverseTransform($value, $options);
71 71
             }));
72 72
     }
@@ -76,25 +76,25 @@  discard block
 block discarded – undo
76 76
         $resolver->setRequired(['class']);
77 77
         $resolver->setDefaults([
78 78
             'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
79
-            'subentities_of' => null,   //Only show entities with the given parent class
80
-            'disable_not_selectable' => false,  //Disable entries with not selectable property
79
+            'subentities_of' => null, //Only show entities with the given parent class
80
+            'disable_not_selectable' => false, //Disable entries with not selectable property
81 81
             'choice_value' => 'id', //Use the element id as option value and for comparing items
82
-            'choice_loader' => function (Options $options) {
83
-                return new CallbackChoiceLoader(function () use ($options) {
82
+            'choice_loader' => function(Options $options) {
83
+                return new CallbackChoiceLoader(function() use ($options) {
84 84
                     return $this->getEntries($options);
85 85
                 });
86 86
             },
87
-            'choice_label' => function ($choice, $key, $value) {
87
+            'choice_label' => function($choice, $key, $value) {
88 88
                 return $this->generateChoiceLabels($choice, $key, $value);
89 89
             },
90
-            'choice_attr' => function ($choice, $key, $value) {
90
+            'choice_attr' => function($choice, $key, $value) {
91 91
                 return $this->generateChoiceAttr($choice, $key, $value);
92 92
             },
93 93
         ]);
94 94
 
95 95
         $resolver->setDefault('empty_message', null);
96 96
 
97
-        $resolver->setDefault('attr', function (Options $options) {
97
+        $resolver->setDefault('attr', function(Options $options) {
98 98
             $tmp = [
99 99
                 'class' => 'selectpicker',
100 100
                 'data-live-search' => true,
Please login to merge, or discard this patch.
src/Form/UserSettingsType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,27 +54,27 @@  discard block
 block discarded – undo
54 54
         $builder
55 55
             ->add('name', TextType::class, [
56 56
                 'label' => 'user.username.label',
57
-                'disabled' => ! $this->security->isGranted('edit_username', $options['data']) || $this->demo_mode,
57
+                'disabled' => !$this->security->isGranted('edit_username', $options['data']) || $this->demo_mode,
58 58
             ])
59 59
             ->add('first_name', TextType::class, [
60 60
                 'required' => false,
61 61
                 'label' => 'user.firstName.label',
62
-                'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
62
+                'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
63 63
             ])
64 64
             ->add('last_name', TextType::class, [
65 65
                 'required' => false,
66 66
                 'label' => 'user.lastName.label',
67
-                'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
67
+                'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
68 68
             ])
69 69
             ->add('department', TextType::class, [
70 70
                 'required' => false,
71 71
                 'label' => 'user.department.label',
72
-                'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
72
+                'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
73 73
             ])
74 74
             ->add('email', EmailType::class, [
75 75
                 'required' => false,
76 76
                 'label' => 'user.email.label',
77
-                'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
77
+                'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode,
78 78
             ])
79 79
             ->add('language', LanguageType::class, [
80 80
                 'disabled' => $this->demo_mode,
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     'class' => 'selectpicker',
106 106
                 ],
107 107
                 'choices' => User::AVAILABLE_THEMES,
108
-                'choice_label' => function ($entity, $key, $value) {
108
+                'choice_label' => function($entity, $key, $value) {
109 109
                     return $value;
110 110
                 },
111 111
                 'placeholder' => 'user_settings.theme.placeholder',
Please login to merge, or discard this patch.
src/Helpers/UTCDateTimeType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
42 42
     {
43
-        if (! self::$utc_timezone) {
43
+        if (!self::$utc_timezone) {
44 44
             self::$utc_timezone = new DateTimeZone('UTC');
45 45
         }
46 46
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function convertToPHPValue($value, AbstractPlatform $platform)
55 55
     {
56
-        if (! self::$utc_timezone) {
56
+        if (!self::$utc_timezone) {
57 57
             self::$utc_timezone = new DateTimeZone('UTC');
58 58
         }
59 59
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             self::$utc_timezone
68 68
         );
69 69
 
70
-        if (! $converted) {
70
+        if (!$converted) {
71 71
             throw ConversionException::conversionFailedFormat($value, $this->getName(), $platform->getDateTimeFormatString());
72 72
         }
73 73
 
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $dataTable
81 81
             ->add('picture', TextColumn::class, [
82 82
                 'label' => '',
83
-                'render' => function ($value, Part $context) {
83
+                'render' => function($value, Part $context) {
84 84
                     $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context);
85 85
                     if (null === $preview_attachment) {
86 86
                         return '';
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             ])
98 98
             ->add('name', TextColumn::class, [
99 99
                 'label' => $this->translator->trans('part.table.name'),
100
-                'render' => function ($value, Part $context) {
100
+                'render' => function($value, Part $context) {
101 101
                     return sprintf(
102 102
                         '<a href="%s">%s</a>',
103 103
                         $this->urlGenerator->infoURL($context),
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             ])
127 127
             ->add('storelocation', TextColumn::class, [
128 128
                 'label' => $this->translator->trans('part.table.storeLocations'),
129
-                'render' => function ($value, Part $context) {
129
+                'render' => function($value, Part $context) {
130 130
                     $tmp = [];
131 131
                     foreach ($context->getPartLots() as $lot) {
132 132
                         //Ignore lots without storelocation
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             ])
146 146
             ->add('amount', TextColumn::class, [
147 147
                 'label' => $this->translator->trans('part.table.amount'),
148
-                'render' => function ($value, Part $context) {
148
+                'render' => function($value, Part $context) {
149 149
                     $amount = $context->getAmountSum();
150 150
 
151 151
                     return $this->amountFormatter->format($amount, $context->getPartUnit());
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             ->add('minamount', TextColumn::class, [
155 155
                 'label' => $this->translator->trans('part.table.minamount'),
156 156
                 'visible' => false,
157
-                'render' => function ($value, Part $context) {
157
+                'render' => function($value, Part $context) {
158 158
                     return $this->amountFormatter->format($value, $context->getPartUnit());
159 159
                 },
160 160
             ])
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
             ->addOrderBy('name')
219 219
             ->createAdapter(FetchJoinORMAdapter::class, [
220 220
                 'simple_total_query' => true,
221
-                'query' => function (QueryBuilder $builder): void {
221
+                'query' => function(QueryBuilder $builder): void {
222 222
                     $this->getQuery($builder);
223 223
                 },
224 224
                 'entity' => Part::class,
225 225
                 'criteria' => [
226
-                    function (QueryBuilder $builder) use ($options): void {
226
+                    function(QueryBuilder $builder) use ($options): void {
227 227
                         $this->buildCriteria($builder, $options);
228 228
                     },
229 229
                     new SearchCriteriaProvider(),
Please login to merge, or discard this patch.
tests/Entity/LogSystem/AbstractLogEntryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     public function targetTypeDataProvider(): array
60 60
     {
61 61
         return [
62
-            [1,  User::class],
62
+            [1, User::class],
63 63
             [2, Attachment::class],
64 64
             [3, AttachmentType::class],
65 65
             [4, Category::class],
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 1;
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/CleanAttachmentsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 
106 106
             $continue = $io->confirm(sprintf('Found %d abandoned files. Do you want to delete them? This can not be undone!', count($file_list)), false);
107 107
 
108
-            if (! $continue) {
108
+            if (!$continue) {
109 109
                 //We are finished here, when no files should be deleted
110 110
                 return 0;
111 111
             }
Please login to merge, or discard this patch.
src/Entity/LogSystem/AbstractLogEntry.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
      */
345 345
     final public static function levelIntToString(int $level): string
346 346
     {
347
-        if (! isset(self::LEVEL_ID_TO_STRING[$level])) {
347
+        if (!isset(self::LEVEL_ID_TO_STRING[$level])) {
348 348
             throw new \InvalidArgumentException('No level with this int is existing!');
349 349
         }
350 350
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     final public static function levelStringToInt(string $level): int
362 362
     {
363 363
         $tmp = array_flip(self::LEVEL_ID_TO_STRING);
364
-        if (! isset($tmp[$level])) {
364
+        if (!isset($tmp[$level])) {
365 365
             throw new \InvalidArgumentException('No level with this string is existing!');
366 366
         }
367 367
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
      */
378 378
     final public static function targetTypeIdToClass(int $type_id): string
379 379
     {
380
-        if (! isset(self::TARGET_CLASS_MAPPING[$type_id])) {
380
+        if (!isset(self::TARGET_CLASS_MAPPING[$type_id])) {
381 381
             throw new \InvalidArgumentException('No target type with this ID is existing!');
382 382
         }
383 383
 
Please login to merge, or discard this patch.
src/Services/LogSystem/EventLogger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@
 block discarded – undo
103 103
         }
104 104
 
105 105
         //Check if the event type is black listed
106
-        if (! empty($blacklist) && $this->isObjectClassInArray($logEntry, $blacklist)) {
106
+        if (!empty($blacklist) && $this->isObjectClassInArray($logEntry, $blacklist)) {
107 107
             return false;
108 108
         }
109 109
 
110 110
         //Check for whitelisting
111
-        if (! empty($whitelist) && ! $this->isObjectClassInArray($logEntry, $whitelist)) {
111
+        if (!empty($whitelist) && !$this->isObjectClassInArray($logEntry, $whitelist)) {
112 112
             return false;
113 113
         }
114 114
 
Please login to merge, or discard this patch.