@@ -66,7 +66,7 @@ |
||
66 | 66 | } else { |
67 | 67 | // We have to sort the pricedetails manually |
68 | 68 | $array = $pricedetails->map( |
69 | - function (Pricedetail $pricedetail) { |
|
69 | + function(Pricedetail $pricedetail) { |
|
70 | 70 | return $pricedetail->getMinDiscountQuantity(); |
71 | 71 | } |
72 | 72 | )->toArray(); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | public function getTests() |
80 | 80 | { |
81 | 81 | return [ |
82 | - new TwigTest('instanceof', function ($var, $instance) { |
|
82 | + new TwigTest('instanceof', function($var, $instance) { |
|
83 | 83 | return $var instanceof $instance; |
84 | 84 | }), |
85 | 85 | ]; |
@@ -77,7 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $key = 'tree_tools_'.$this->keyGenerator->generateKey(); |
79 | 79 | |
80 | - return $this->cache->get($key, function (ItemInterface $item) { |
|
80 | + return $this->cache->get($key, function(ItemInterface $item) { |
|
81 | 81 | //Invalidate tree, whenever group or the user changes |
82 | 82 | $item->tag(['tree_tools', 'groups', $this->keyGenerator->generateKey()]); |
83 | 83 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $crawler = $client->request('GET', static::$base_path.'/new'); |
72 | 72 | $this->assertFalse($client->getResponse()->isRedirect()); |
73 | 73 | $this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!'); |
74 | - $this->assertSame($read, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
74 | + $this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $crawler = $client->request('GET', static::$base_path.'/1'); |
97 | 97 | $this->assertFalse($client->getResponse()->isRedirect()); |
98 | 98 | $this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!'); |
99 | - $this->assertSame($read, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
99 | + $this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | public function deleteDataProvider() |
@@ -133,6 +133,6 @@ discard block |
||
133 | 133 | |
134 | 134 | //Page is redirected to '/new', when delete was successful |
135 | 135 | $this->assertSame($delete, $client->getResponse()->isRedirect(static::$base_path.'/new')); |
136 | - $this->assertSame($delete, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
136 | + $this->assertSame($delete, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
137 | 137 | } |
138 | 138 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function requestPwReset(PasswordResetManager $passwordReset, Request $request) |
74 | 74 | { |
75 | - if (! $this->allow_email_pw_reset) { |
|
75 | + if (!$this->allow_email_pw_reset) { |
|
76 | 76 | throw new AccessDeniedHttpException('The password reset via email is disabled!'); |
77 | 77 | } |
78 | 78 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function pwResetNewPw(PasswordResetManager $passwordReset, Request $request, ?string $user = null, ?string $token = null) |
116 | 116 | { |
117 | - if (! $this->allow_email_pw_reset) { |
|
117 | + if (!$this->allow_email_pw_reset) { |
|
118 | 118 | throw new AccessDeniedHttpException('The password reset via email is disabled!'); |
119 | 119 | } |
120 | 120 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $data = $form->getData(); |
153 | 153 | //Try to set the new password |
154 | 154 | $success = $passwordReset->setNewPassword($data['username'], $data['token'], $data['new_password']); |
155 | - if (! $success) { |
|
155 | + if (!$success) { |
|
156 | 156 | $this->addFlash('error', 'pw_reset.new_pw.error'); |
157 | 157 | } else { |
158 | 158 | $this->addFlash('success', 'pw_reset.new_pw.success'); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | /** @var TreeViewNode $element */ |
40 | 40 | $element = $this->current(); |
41 | 41 | |
42 | - return ! empty($element->getNodes()); |
|
42 | + return !empty($element->getNodes()); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public function getChildren() |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function checkPostAuth(UserInterface $user): void |
55 | 55 | { |
56 | - if (! $user instanceof User) { |
|
56 | + if (!$user instanceof User) { |
|
57 | 57 | return; |
58 | 58 | } |
59 | 59 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | // if the user is anonymous, we use the anonymous user. |
61 | - if (! $user instanceof User) { |
|
61 | + if (!$user instanceof User) { |
|
62 | 62 | $repo = $this->entityManager->getRepository(User::class); |
63 | 63 | $user = $repo->getAnonymousUser(); |
64 | 64 | if (null === $user) { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | ]); |
80 | 80 | |
81 | 81 | //Add pricedetails after we know the data, so we can set the default currency |
82 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options): void { |
|
82 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options): void { |
|
83 | 83 | /** @var Orderdetail $orderdetail */ |
84 | 84 | $orderdetail = $event->getData(); |
85 | 85 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'prototype_data' => $dummy_pricedetail, |
98 | 98 | 'by_reference' => false, |
99 | 99 | 'entry_options' => [ |
100 | - 'disabled' => ! $this->security->isGranted('@parts_prices.edit'), |
|
100 | + 'disabled' => !$this->security->isGranted('@parts_prices.edit'), |
|
101 | 101 | 'measurement_unit' => $options['measurement_unit'], |
102 | 102 | ], |
103 | 103 | ]); |