Passed
Push — master ( 7ed183...b6e88d )
by Jan
04:19
created
src/Form/AdminPages/CurrencyAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 'class' => 'selectpicker',
44 44
                 'data-live-search' => true,
45 45
             ],
46
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
46
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
47 47
         ]);
48 48
 
49 49
         $builder->add('exchange_rate', MoneyType::class, [
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             'label' => 'currency.edit.exchange_rate',
52 52
             'currency' => $this->params->get('default_currency'),
53 53
             'scale' => 6,
54
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
54
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
55 55
         ]);
56 56
     }
57 57
 }
Please login to merge, or discard this patch.
src/Form/AdminPages/MassCreationForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         //Disable import if user is not allowed to create elements.
49 49
         $entity = new $data['entity_class']();
50 50
         $perm_name = 'create';
51
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
51
+        $disabled = !$this->security->isGranted($perm_name, $entity);
52 52
 
53 53
         $builder
54 54
             ->add('lines', TextareaType::class, [
Please login to merge, or discard this patch.
src/Form/AdminPages/GroupAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
             'label_attr' => [
43 43
                 'class' => 'checkbox-custom',
44 44
             ],
45
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
45
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
46 46
         ]);
47 47
 
48 48
         $builder->add('permissions', PermissionsType::class, [
49 49
             'mapped' => false,
50 50
             'data' => $builder->getData(),
51
-            'disabled' => ! $this->security->isGranted('edit_permissions', $entity),
51
+            'disabled' => !$this->security->isGranted('edit_permissions', $entity),
52 52
         ]);
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
src/Form/Type/MasterPictureAttachmentType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
             'attr' => [
46 46
                 'class' => 'selectpicker',
47 47
             ],
48
-            'choice_attr' => function (Options $options) {
49
-                return  function ($choice, $key, $value) use ($options) {
48
+            'choice_attr' => function(Options $options) {
49
+                return  function($choice, $key, $value) use ($options) {
50 50
                     /** @var Attachment $choice */
51 51
                     $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL'];
52 52
 
53
-                    if ('picture' === $options['filter'] && ! $choice->isPicture()) {
53
+                    if ('picture' === $options['filter'] && !$choice->isPicture()) {
54 54
                         $tmp += ['disabled' => 'disabled'];
55
-                    } elseif ('3d_model' === $options['filter'] && ! $choice->is3DModel()) {
55
+                    } elseif ('3d_model' === $options['filter'] && !$choice->is3DModel()) {
56 56
                         $tmp += ['disabled' => 'disabled'];
57 57
                     }
58 58
 
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
                 };
61 61
             },
62 62
             'choice_label' => 'name',
63
-            'class' => function (Options $options) {
63
+            'class' => function(Options $options) {
64 64
                 $short_class_name = (new ReflectionClass($options['entity']))->getShortName();
65 65
                 //Category becomes CategoryAttachment
66 66
                 return 'App\\Entity\\Attachments\\'.$short_class_name.'Attachment';
67 67
             },
68
-            'query_builder' => function (Options $options) {
69
-                return function (EntityRepository $er) use ($options) {
68
+            'query_builder' => function(Options $options) {
69
+                return function(EntityRepository $er) use ($options) {
70 70
                     $entity = $options['entity'];
71 71
                     if (null === $entity->getID()) {
72 72
                         //This query is always false, so we get empty results
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.
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.