@@ -84,12 +84,12 @@ |
||
| 84 | 84 | ->willReturn(true); |
| 85 | 85 | $this->translator->expects(self::any()) |
| 86 | 86 | ->method('trans') |
| 87 | - ->willReturnCallback(function ($label) { |
|
| 87 | + ->willReturnCallback(function($label) { |
|
| 88 | 88 | return 'trans' . $label; |
| 89 | 89 | }); |
| 90 | 90 | $this->assetHelper->expects(self::any()) |
| 91 | 91 | ->method('getUrl') |
| 92 | - ->willReturnCallback(function ($icon) { |
|
| 92 | + ->willReturnCallback(function($icon) { |
|
| 93 | 93 | return '/' . $icon; |
| 94 | 94 | }); |
| 95 | 95 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | new YamlCumulativeFileLoader('Resources/public/sidebar_widgets/{folder}/widget.yml') |
| 55 | 55 | ) |
| 56 | 56 | ); |
| 57 | - $resources = $configLoader->load($container); |
|
| 57 | + $resources = $configLoader->load($container); |
|
| 58 | 58 | foreach ($resources as $resource) { |
| 59 | 59 | $result[basename(dirname($resource->path))] = $resource->data; |
| 60 | 60 | } |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | protected function normalizeLoadedData() |
| 179 | 179 | { |
| 180 | 180 | // strip whitespace from the beginning and end of descriptions |
| 181 | - array_walk_recursive($this->loadedData, function (&$element) { |
|
| 181 | + array_walk_recursive($this->loadedData, function(&$element) { |
|
| 182 | 182 | if (is_string($element) && $element) { |
| 183 | 183 | $element = trim($element); |
| 184 | 184 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $this->containerBuilder->expects($this->exactly(5)) |
| 92 | 92 | ->method('findDefinition') |
| 93 | - ->will($this->returnCallback(function ($handlerId) { |
|
| 93 | + ->will($this->returnCallback(function($handlerId) { |
|
| 94 | 94 | switch ($handlerId) { |
| 95 | 95 | case 'monolog.logger': |
| 96 | 96 | $logger = $this->createMock(Definition::class); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | $this->containerBuilder->expects($this->exactly(6)) |
| 170 | 170 | ->method('findDefinition') |
| 171 | - ->will($this->returnCallback(function ($handlerId) { |
|
| 171 | + ->will($this->returnCallback(function($handlerId) { |
|
| 172 | 172 | switch ($handlerId) { |
| 173 | 173 | case 'monolog.logger': |
| 174 | 174 | case 'monolog.logger.doctrine': |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | $handler = $this->createMock(Definition::class); |
| 237 | 237 | $handler->expects($this->once()) |
| 238 | 238 | ->method('addMethodCall') |
| 239 | - ->with('setHandler', $this->callback(function ($args) { |
|
| 239 | + ->with('setHandler', $this->callback(function($args) { |
|
| 240 | 240 | return (string)$args[0] == 'monolog.handler.detailed_logs_nested'; |
| 241 | 241 | })); |
| 242 | 242 | return $handler; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | $this->containerBuilder->expects($this->exactly(2)) |
| 269 | 269 | ->method('findDefinition') |
| 270 | - ->will($this->returnCallback(function ($handlerId) { |
|
| 270 | + ->will($this->returnCallback(function($handlerId) { |
|
| 271 | 271 | switch ($handlerId) { |
| 272 | 272 | case 'monolog.logger': |
| 273 | 273 | $detailedLogsHandlerReference = $this->createMock(Reference::class); |
@@ -365,7 +365,7 @@ |
||
| 365 | 365 | */ |
| 366 | 366 | public function toString() |
| 367 | 367 | { |
| 368 | - return 'code:'.$this->getCode(); |
|
| 368 | + return 'code:' . $this->getCode(); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | /** |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $repositoryLocalization->expects($this->any()) |
| 48 | 48 | ->method('find') |
| 49 | 49 | ->willReturnCallback( |
| 50 | - function ($id) { |
|
| 50 | + function($id) { |
|
| 51 | 51 | return $this->getEntity(Localization::class, ['id' => $id]); |
| 52 | 52 | } |
| 53 | 53 | ); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $repositoryLocalizedFallbackValue->expects($this->any()) |
| 57 | 57 | ->method('find') |
| 58 | 58 | ->willReturnCallback( |
| 59 | - function ($id) { |
|
| 59 | + function($id) { |
|
| 60 | 60 | return $this->getEntity(LocalizedFallbackValue::class, ['id' => $id]); |
| 61 | 61 | } |
| 62 | 62 | ); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->translator->expects($this->any()) |
| 37 | 37 | ->method('trans') |
| 38 | 38 | ->willReturnCallback( |
| 39 | - function ($id) { |
|
| 39 | + function($id) { |
|
| 40 | 40 | return $id . '.trans'; |
| 41 | 41 | } |
| 42 | 42 | ); |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function setTopic($topic) |
| 53 | 53 | { |
| 54 | - $this->topic = (string) $topic; |
|
| 54 | + $this->topic = (string)$topic; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | protected function createReplyEmailModels(Email $email, Collection $rules) |
| 209 | 209 | { |
| 210 | - return $rules->map(function (AutoResponseRule $rule) use ($email) { |
|
| 210 | + return $rules->map(function(AutoResponseRule $rule) use ($email) { |
|
| 211 | 211 | $emailModel = $this->emailBuilder->createReplyEmailModel($email); |
| 212 | 212 | $emailModel->setFrom($rule->getMailbox()->getEmail()); |
| 213 | 213 | $emailModel->setTo([$email->getFromEmailAddress()->getEmail()]); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | */ |
| 270 | 270 | public function getApplicableRules(Mailbox $mailbox, Email $email) |
| 271 | 271 | { |
| 272 | - return $mailbox->getAutoResponseRules()->filter(function (AutoResponseRule $rule) use ($email) { |
|
| 272 | + return $mailbox->getAutoResponseRules()->filter(function(AutoResponseRule $rule) use ($email) { |
|
| 273 | 273 | return $rule->isActive() |
| 274 | 274 | && $this->isExprApplicable($email, $this->createRuleExpr($rule, $email)) |
| 275 | 275 | && $rule->getCreatedAt() < $email->getSentAt(); |
@@ -333,11 +333,11 @@ discard block |
||
| 333 | 333 | throw new \LogicException('Number of operators have to be about 1 less than number of exprs.'); |
| 334 | 334 | } |
| 335 | 335 | |
| 336 | - $exprOperators = array_map(function ($operator) { |
|
| 336 | + $exprOperators = array_map(function($operator) { |
|
| 337 | 337 | return $this->filterOperatorToExprMap[$operator]; |
| 338 | 338 | }, $operators); |
| 339 | 339 | |
| 340 | - return array_reduce($exprs, function ($carry, $expr) use (&$exprOperators) { |
|
| 340 | + return array_reduce($exprs, function($carry, $expr) use (&$exprOperators) { |
|
| 341 | 341 | if (!$carry) { |
| 342 | 342 | return $expr; |
| 343 | 343 | } |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | return []; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | - return array_map(function ($key) use ($field) { |
|
| 397 | + return array_map(function($key) use ($field) { |
|
| 398 | 398 | return sprintf('$%s', str_replace(static::INDEX_PLACEHOLDER, $key, $field)); |
| 399 | 399 | }, $keys); |
| 400 | 400 | } |