@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'title' => 'selectpicker.nothing_selected', |
63 | 63 | 'data-live-search' => true, |
64 | 64 | ], |
65 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
65 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
66 | 66 | ]); |
67 | 67 | |
68 | 68 | $builder->add('exchange_rate', MoneyType::class, [ |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | 'label' => 'currency.edit.exchange_rate', |
71 | 71 | 'currency' => $this->params->get('default_currency'), |
72 | 72 | 'scale' => 6, |
73 | - 'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
73 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), |
|
74 | 74 | ]); |
75 | 75 | } |
76 | 76 | } |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | 'class' => 'selectpicker', |
66 | 66 | 'title' => 'selectpicker.nothing_selected', |
67 | 67 | ], |
68 | - 'choice_attr' => function (Options $options) { |
|
69 | - return function ($choice, $key, $value) use ($options) { |
|
68 | + 'choice_attr' => function(Options $options) { |
|
69 | + return function($choice, $key, $value) use ($options) { |
|
70 | 70 | /** @var Attachment $choice */ |
71 | 71 | $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL']; |
72 | 72 | |
73 | - if ('picture' === $options['filter'] && ! $choice->isPicture()) { |
|
73 | + if ('picture' === $options['filter'] && !$choice->isPicture()) { |
|
74 | 74 | $tmp += ['disabled' => 'disabled']; |
75 | - } elseif ('3d_model' === $options['filter'] && ! $choice->is3DModel()) { |
|
75 | + } elseif ('3d_model' === $options['filter'] && !$choice->is3DModel()) { |
|
76 | 76 | $tmp += ['disabled' => 'disabled']; |
77 | 77 | } |
78 | 78 | |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | }; |
81 | 81 | }, |
82 | 82 | 'choice_label' => 'name', |
83 | - 'choice_loader' => function (Options $options) { |
|
84 | - return new CallbackChoiceLoader(function () use ($options) { |
|
83 | + 'choice_loader' => function(Options $options) { |
|
84 | + return new CallbackChoiceLoader(function() use ($options) { |
|
85 | 85 | $entity = $options['entity']; |
86 | - if (! $entity instanceof AttachmentContainingDBElement) { |
|
86 | + if (!$entity instanceof AttachmentContainingDBElement) { |
|
87 | 87 | throw new \RuntimeException('$entity must have Attachments! (be of type AttachmentContainingDBElement)'); |
88 | 88 | } |
89 | 89 |
@@ -72,27 +72,27 @@ discard block |
||
72 | 72 | $builder |
73 | 73 | ->add('name', TextType::class, [ |
74 | 74 | 'label' => 'user.username.label', |
75 | - 'disabled' => ! $this->security->isGranted('edit_username', $options['data']) || $this->demo_mode, |
|
75 | + 'disabled' => !$this->security->isGranted('edit_username', $options['data']) || $this->demo_mode, |
|
76 | 76 | ]) |
77 | 77 | ->add('first_name', TextType::class, [ |
78 | 78 | 'required' => false, |
79 | 79 | 'label' => 'user.firstName.label', |
80 | - 'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
80 | + 'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
81 | 81 | ]) |
82 | 82 | ->add('last_name', TextType::class, [ |
83 | 83 | 'required' => false, |
84 | 84 | 'label' => 'user.lastName.label', |
85 | - 'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
85 | + 'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
86 | 86 | ]) |
87 | 87 | ->add('department', TextType::class, [ |
88 | 88 | 'required' => false, |
89 | 89 | 'label' => 'user.department.label', |
90 | - 'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
90 | + 'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
91 | 91 | ]) |
92 | 92 | ->add('email', EmailType::class, [ |
93 | 93 | 'required' => false, |
94 | 94 | 'label' => 'user.email.label', |
95 | - 'disabled' => ! $this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
95 | + 'disabled' => !$this->security->isGranted('edit_infos', $options['data']) || $this->demo_mode, |
|
96 | 96 | ]) |
97 | 97 | ->add('language', LanguageType::class, [ |
98 | 98 | 'disabled' => $this->demo_mode, |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ], |
125 | 125 | 'choice_translation_domain' => false, |
126 | 126 | 'choices' => User::AVAILABLE_THEMES, |
127 | - 'choice_label' => function ($entity, $key, $value) { |
|
127 | + 'choice_label' => function($entity, $key, $value) { |
|
128 | 128 | return $value; |
129 | 129 | }, |
130 | 130 | 'placeholder' => 'user_settings.theme.placeholder', |