@@ -54,7 +54,7 @@ |
||
54 | 54 | ->getMock(); |
55 | 55 | $kernel |
56 | 56 | ->method('getModule') |
57 | - ->will($this->returnCallback(function ($moduleName) { |
|
57 | + ->will($this->returnCallback(function($moduleName) { |
|
58 | 58 | if ($moduleName == 'ExceptionModule') { |
59 | 59 | // mocks situation where module is not namespaced. |
60 | 60 | throw new \Exception(); |
@@ -76,6 +76,6 @@ |
||
76 | 76 | |
77 | 77 | private function getSplFileInfo($file) |
78 | 78 | { |
79 | - return new SplFileInfo(realpath(__DIR__ . '/../Fixtures/'. $file), '/../Fixtures', '/../Fixtures/' . $file); |
|
79 | + return new SplFileInfo(realpath(__DIR__ . '/../Fixtures/' . $file), '/../Fixtures', '/../Fixtures/' . $file); |
|
80 | 80 | } |
81 | 81 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | /** |
130 | 130 | * Form Listeners |
131 | 131 | */ |
132 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
132 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
133 | 133 | $data = $event->getData(); |
134 | 134 | // clear anti-spam answer if there is no question |
135 | 135 | if (empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_QUESTION])) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'translator' => null, |
155 | 155 | 'constraints' => [ |
156 | 156 | new Callback([ |
157 | - 'callback' => function ($data, ExecutionContextInterface $context) { |
|
157 | + 'callback' => function($data, ExecutionContextInterface $context) { |
|
158 | 158 | if (!empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_QUESTION]) && empty($data[ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_ANSWER])) { |
159 | 159 | $context->buildViolation(__('If a spam protection question is provided, then a spam protection answer must also be provided.')) |
160 | 160 | ->atPath(ZAuthConstant::MODVAR_REGISTRATION_ANTISPAM_ANSWER) |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $resolver->setDefaults([ |
79 | 79 | 'translator' => null, |
80 | 80 | 'includeReset' => false, |
81 | - 'constraints' => new Callback(['callback' => function ($data, ExecutionContextInterface $context) use ($resolver) { |
|
81 | + 'constraints' => new Callback(['callback' => function($data, ExecutionContextInterface $context) use ($resolver) { |
|
82 | 82 | if (!isset($data['pass']) && empty($data['uname']) && empty($data['email'])) { |
83 | 83 | $context->buildViolation(__('Error! You must enter either your username or email address.')) |
84 | 84 | ->addViolation(); |
@@ -1130,7 +1130,7 @@ |
||
1130 | 1130 | * |
1131 | 1131 | * @return array of entity objects |
1132 | 1132 | */ |
1133 | - public function getRelatedObjectsToPersist(&$objects = []) |
|
1133 | + public function getRelatedObjectsToPersist(&$objects = []) |
|
1134 | 1134 | { |
1135 | 1135 | return []; |
1136 | 1136 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | 'constraints' => [ |
140 | 140 | new Type('string'), |
141 | 141 | new Regex([ |
142 | - 'pattern' => '/^(?:'. UsersConstant::UNAME_VALIDATION_PATTERN .'(?:\s*,\s*'. UsersConstant::UNAME_VALIDATION_PATTERN .')*)?$/uD', |
|
142 | + 'pattern' => '/^(?:' . UsersConstant::UNAME_VALIDATION_PATTERN . '(?:\s*,\s*' . UsersConstant::UNAME_VALIDATION_PATTERN . ')*)?$/uD', |
|
143 | 143 | 'message' => $options['translator']->__('The value provided does not appear to be a valid list of user names. The list should consist of one or more user names made up of lowercase letters, numbers, underscores, periods, or dashes. Separate each user name with a comma. For example: \'root, administrator, superuser\' (the quotes should not appear in the list). Spaces surrounding commas are ignored, however extra spaces before or after the list are not and will result in an error. Empty values (two commas together, or separated only by spaces) are not allowed. The list is optional, and if no values are to be defined then the list should be completely empty (no extra spaces, commas, or any other characters).') |
144 | 144 | ]) |
145 | 145 | ] |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | 'constraints' => [ |
167 | 167 | new Type('string'), |
168 | 168 | new Regex([ |
169 | - 'pattern' => '/^(?:'. UsersConstant::EMAIL_DOMAIN_VALIDATION_PATTERN .'(?:\s*,\s*'. UsersConstant::EMAIL_DOMAIN_VALIDATION_PATTERN .')*)?$/Ui', |
|
169 | + 'pattern' => '/^(?:' . UsersConstant::EMAIL_DOMAIN_VALIDATION_PATTERN . '(?:\s*,\s*' . UsersConstant::EMAIL_DOMAIN_VALIDATION_PATTERN . ')*)?$/Ui', |
|
170 | 170 | 'message' => $options['translator']->__('The contents of this field does not appear to be a valid list of e-mail address domains. The list should consist of one or more e-mail address domains (the part after the \'@\'), separated by commas. For example: \'gmail.com, example.org, acme.co.uk\' (the quotes should not appear in the list). Do not include the \'@\' itself. Spaces surrounding commas are ignored, however extra spaces before or after the list are not and will result in an error. Empty values (two commas together, or separated only by spaces) are not allowed. The list is optional, and if no values are to be defined then the list should be completely empty (no extra spaces, commas, or any other characters).') |
171 | 171 | ]) |
172 | 172 | ] |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | $builder |
25 | 25 | ->add('users', EntityType::class, [ |
26 | - 'choice_attr' => function () { |
|
26 | + 'choice_attr' => function() { |
|
27 | 27 | return ['class' => 'user-checkboxes']; |
28 | 28 | }, |
29 | 29 | 'class' => 'ZikulaUsersModule:UserEntity', |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | $router |
33 | 33 | ->method('generate') |
34 | - ->will($this->returnCallback(function ($id, $params) { |
|
34 | + ->will($this->returnCallback(function($id, $params) { |
|
35 | 35 | return '/foo?' . http_build_query($params); |
36 | 36 | })); |
37 | 37 |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | foreach ($parts['join'][$this->alias] as $join) { |
84 | 84 | $j = explode('.', $join->getJoin(), 2); |
85 | 85 | if (count($j) != 2) { |
86 | - throw new \InvalidArgumentException('Join in wrong format: '.$join->getJoin()); |
|
86 | + throw new \InvalidArgumentException('Join in wrong format: ' . $join->getJoin()); |
|
87 | 87 | } |
88 | 88 | if (!isset($this->meta[$j[0]])) { |
89 | - throw new \InvalidArgumentException('Unknown alias in join or wrong order: '.$join->getJoin()); |
|
89 | + throw new \InvalidArgumentException('Unknown alias in join or wrong order: ' . $join->getJoin()); |
|
90 | 90 | } |
91 | 91 | if (!isset($this->meta[$j[0]]->associationMappings[$j[1]])) { |
92 | - throw new \InvalidArgumentException('Unknown Mapping in join: '.$join->getJoin()); |
|
92 | + throw new \InvalidArgumentException('Unknown Mapping in join: ' . $join->getJoin()); |
|
93 | 93 | } |
94 | 94 | $jEntity = $this->meta[$j[0]]->associationMappings[$j[1]]['targetEntity']; |
95 | 95 | $this->meta[$join->getAlias()] = $mdf->getMetadataFor($jEntity); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | { |
130 | 130 | $this->paramNumber++; |
131 | 131 | |
132 | - return ':'.$pluginName.'_'.str_replace('.', '', $fieldName).'_'.$this->paramNumber; |
|
132 | + return ':' . $pluginName . '_' . str_replace('.', '', $fieldName) . '_' . $this->paramNumber; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | public function addAliasTo($s) |
219 | 219 | { |
220 | 220 | if (strpos($s, '.') === false) { |
221 | - return $this->alias.'.'.$s; |
|
221 | + return $this->alias . '.' . $s; |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | return $s; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | if (count($parts) < 2 || !isset($this->meta[$parts[0]]) || |
240 | 240 | !isset($this->meta[$parts[0]]->fieldMappings[$parts[1]]) |
241 | 241 | ) { |
242 | - throw new \InvalidArgumentException('Unknown field name: '.$field); |
|
242 | + throw new \InvalidArgumentException('Unknown field name: ' . $field); |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | } |