@@ -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 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $translator = $this->createMock('Symfony\Component\Translation\TranslatorInterface'); |
| 63 | 63 | $translator->expects($this->any()) |
| 64 | 64 | ->method('trans') |
| 65 | - ->will($this->returnCallback(function ($id) { |
|
| 65 | + ->will($this->returnCallback(function($id) { |
|
| 66 | 66 | return $id; |
| 67 | 67 | })); |
| 68 | 68 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | $results = []; |
| 209 | 209 | foreach ($definitionNames as $definition) { |
| 210 | - $results[] = array_map(function ($data) use ($definition) { |
|
| 210 | + $results[] = array_map(function($data) use ($definition) { |
|
| 211 | 211 | $body = new EmailBody(); |
| 212 | 212 | $body->setBodyContent($data['body']); |
| 213 | 213 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | protected function setUp() |
| 61 | 61 | { |
| 62 | - $this->emailOwnerManager = |
|
| 62 | + $this->emailOwnerManager = |
|
| 63 | 63 | $this->getMockBuilder('Oro\Bundle\EmailBundle\Entity\Manager\EmailOwnerManager') |
| 64 | 64 | ->disableOriginalConstructor() |
| 65 | 65 | ->getMock(); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | ->will($this->returnValue([])); |
| 217 | 217 | $this->emailOwnerManager->expects($this->once()) |
| 218 | 218 | ->method('handleChangedAddresses') |
| 219 | - ->willReturn([[],[]]); |
|
| 219 | + ->willReturn([[], []]); |
|
| 220 | 220 | $this->emailActivityManager->expects($this->once()) |
| 221 | 221 | ->method('updateActivities') |
| 222 | 222 | ->with($createdEmails); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | parent::onFlush($args); |
| 59 | 59 | $this->emailBodies = array_filter( |
| 60 | 60 | $this->emailBodies, |
| 61 | - function (EmailBody $body) { |
|
| 61 | + function(EmailBody $body) { |
|
| 62 | 62 | return $body->getEmail() && !$body->getEmail()->getThread(); |
| 63 | 63 | } |
| 64 | 64 | ); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $email = $this->doctrineHelper->getEntity(Email::ENTITY_CLASS, $event->getTargetId()); |
| 41 | 41 | if ($email->getThread()) { |
| 42 | 42 | $emailIds = array_map( |
| 43 | - function ($emailEntity) { |
|
| 43 | + function($emailEntity) { |
|
| 44 | 44 | return $emailEntity->getId(); |
| 45 | 45 | }, |
| 46 | 46 | $email->getThread()->getEmails()->toArray() |