@@ -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() |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function replace(EmailBodyLoaded $event) |
| 14 | 14 | { |
| 15 | - $emailBody = $event->getEmail()->getEmailBody(); |
|
| 15 | + $emailBody = $event->getEmail()->getEmailBody(); |
|
| 16 | 16 | if ($emailBody !== null) { |
| 17 | 17 | $content = $emailBody->getBodyContent(); |
| 18 | 18 | $attachments = $emailBody->getAttachments(); |
@@ -236,7 +236,7 @@ |
||
| 236 | 236 | */ |
| 237 | 237 | protected function getEmailFilter() |
| 238 | 238 | { |
| 239 | - return function ($entity) { |
|
| 239 | + return function($entity) { |
|
| 240 | 240 | return $entity instanceof Email; |
| 241 | 241 | }; |
| 242 | 242 | } |
@@ -428,7 +428,7 @@ |
||
| 428 | 428 | $activityOwner->setOrganization($owner->getOrganization()); |
| 429 | 429 | $user = $owner->getOwner(); |
| 430 | 430 | if (!$owner->getOwner() && $owner->getMailboxOwner()) { |
| 431 | - $settings = $owner->getMailboxOwner()->getProcessSettings(); |
|
| 431 | + $settings = $owner->getMailboxOwner()->getProcessSettings(); |
|
| 432 | 432 | if ($settings) { |
| 433 | 433 | $user = $settings->getOwner(); |
| 434 | 434 | } |
@@ -234,7 +234,7 @@ |
||
| 234 | 234 | $guesser = ExtensionGuesser::getInstance(); |
| 235 | 235 | $body = preg_replace_callback( |
| 236 | 236 | '/<img(.*)src(\s*)=(\s*)["\'](.*)["\']/U', |
| 237 | - function ($matches) use ($message, $guesser, $model) { |
|
| 237 | + function($matches) use ($message, $guesser, $model) { |
|
| 238 | 238 | if (count($matches) === 5) { |
| 239 | 239 | // 1st match contains any data between '<img' and 'src' parts (e.g. 'width=100') |
| 240 | 240 | $imgConfig = $matches[1]; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $target = $this->doctrineHelper->getEntityRepository($targetClass)->find($targetId); |
| 81 | 81 | $countNewAssociations = 0; |
| 82 | - $emails =$this->emailManager->findEmailsByIds($ids); |
|
| 82 | + $emails = $this->emailManager->findEmailsByIds($ids); |
|
| 83 | 83 | foreach ($emails as $email) { |
| 84 | 84 | $result = $this->emailActivityManager->addAssociation($email, $target); |
| 85 | 85 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $ownerIds = (new BufferedIdentityQueryResultIterator($ownerIdsQb)) |
| 117 | 117 | ->setBufferSize(self::OWNER_IDS_BUFFER_SIZE) |
| 118 | - ->setPageLoadedCallback(function (array $rows) use ($emailOwnerClassName) { |
|
| 118 | + ->setPageLoadedCallback(function(array $rows) use ($emailOwnerClassName) { |
|
| 119 | 119 | $ownerIds = array_map('current', $rows); |
| 120 | 120 | if ($this->queued) { |
| 121 | 121 | $this->producer->send( |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $emailIds = []; |
| 158 | 158 | $emails = (new BufferedIdentityQueryResultIterator($emailQB)) |
| 159 | 159 | ->setBufferSize(self::EMAIL_BUFFER_SIZE) |
| 160 | - ->setPageCallback(function () use ( |
|
| 160 | + ->setPageCallback(function() use ( |
|
| 161 | 161 | &$owner, |
| 162 | 162 | &$emailIds, |
| 163 | 163 | &$ownerClassName, |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | { |
| 234 | 234 | return (new BufferedIdentityQueryResultIterator($ownerQb)) |
| 235 | 235 | ->setBufferSize(1) |
| 236 | - ->setPageCallback(function () { |
|
| 236 | + ->setPageCallback(function() { |
|
| 237 | 237 | $this->getEmailEntityManager()->flush(); |
| 238 | 238 | $this->getEmailEntityManager()->clear(); |
| 239 | 239 | }); |