@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | $builder->add('address', TextareaType::class, [ |
41 | 41 | 'label' => 'company.edit.address', |
42 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
42 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
43 | 43 | 'attr' => [ |
44 | 44 | 'placeholder' => 'company.edit.address.placeholder', |
45 | 45 | ], |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $builder->add('phone_number', TelType::class, [ |
51 | 51 | 'label' => 'company.edit.phone_number', |
52 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
52 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
53 | 53 | 'attr' => [ |
54 | 54 | 'placeholder' => 'company.edit.phone_number.placeholder', |
55 | 55 | ], |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | $builder->add('fax_number', TelType::class, [ |
61 | 61 | 'label' => 'company.edit.fax_number', |
62 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
62 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
63 | 63 | 'attr' => [ |
64 | 64 | 'placeholder' => 'company.fax_number.placeholder', |
65 | 65 | ], |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $builder->add('email_address', EmailType::class, [ |
71 | 71 | 'label' => 'company.edit.email', |
72 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
72 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
73 | 73 | 'attr' => [ |
74 | 74 | 'placeholder' => 'company.edit.email.placeholder', |
75 | 75 | ], |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | $builder->add('website', UrlType::class, [ |
81 | 81 | 'label' => 'company.edit.website', |
82 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
82 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
83 | 83 | 'attr' => [ |
84 | 84 | 'placeholder' => 'company.edit.website.placeholder', |
85 | 85 | ], |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $builder->add('auto_product_url', UrlType::class, [ |
91 | 91 | 'label' => 'company.edit.auto_product_url', |
92 | 92 | 'help' => 'company.edit.auto_product_url.help', |
93 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
93 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
94 | 94 | 'attr' => [ |
95 | 95 | 'placeholder' => 'company.edit.auto_product_url.placeholder', |
96 | 96 | ], |
@@ -43,7 +43,7 @@ discard block |
||
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 |
||
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 | } |
@@ -48,7 +48,7 @@ |
||
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, [ |
@@ -42,13 +42,13 @@ |
||
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 | } |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -59,7 +59,7 @@ |
||
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], |
@@ -78,14 +78,14 @@ |
||
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) { |
@@ -105,7 +105,7 @@ |
||
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 | } |
@@ -344,7 +344,7 @@ discard block |
||
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 |
||
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 |
||
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 |