@@ -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 | /** |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | if (isset($field['sortable']) && $field['sortable']) { |
168 | 168 | $sorters['columns'][$fieldName] = [ |
169 | 169 | 'data_name' => isset($field['expression']) ? $field['expression'] : null, |
170 | - 'apply_callback' => function (OrmDatasource $datasource, $sortKey, $direction) { |
|
170 | + 'apply_callback' => function(OrmDatasource $datasource, $sortKey, $direction) { |
|
171 | 171 | if ($sortKey) { |
172 | 172 | $datasource->getQueryBuilder()->addOrderBy($sortKey, $direction); |
173 | 173 | } |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function getActionConfigurationClosure($actions) |
299 | 299 | { |
300 | - return function (ResultRecord $record) use ($actions) { |
|
300 | + return function(ResultRecord $record) use ($actions) { |
|
301 | 301 | $result = []; |
302 | 302 | foreach ($actions as $action => $filters) { |
303 | 303 | $isApplicable = true; |
@@ -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); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $router = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\Router') |
63 | 63 | ->disableOriginalConstructor() |
64 | 64 | ->getMock(); |
65 | - $configManager = $this->getMockBuilder('Oro\Bundle\EntityConfigBundle\Config\ConfigManager') |
|
65 | + $configManager = $this->getMockBuilder('Oro\Bundle\EntityConfigBundle\Config\ConfigManager') |
|
66 | 66 | ->disableOriginalConstructor() |
67 | 67 | ->getMock(); |
68 | 68 | $emailThreadProvider = $this->getMockBuilder('Oro\Bundle\EmailBundle\Entity\Provider\EmailThreadProvider') |
@@ -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() |