@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | 'additionalEmailAssociations', |
106 | 106 | $this->anything(), |
107 | 107 | $this->callback( |
108 | - function ($options) { |
|
108 | + function($options) { |
|
109 | 109 | $expectedChoices = [ |
110 | 110 | 'groups.owner' => 'Groups > Owner', |
111 | 111 | 'users' => 'Users', |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'additionalEmailAssociations', |
193 | 193 | $this->anything(), |
194 | 194 | $this->callback( |
195 | - function ($options) { |
|
195 | + function($options) { |
|
196 | 196 | $expectedChoices = [ |
197 | 197 | 'groups.owner' => 'Groups > Owner', |
198 | 198 | 'users' => 'Users', |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | // get user emails |
210 | 210 | $results = $this->getUsers()->map( |
211 | - function (User $user) { |
|
211 | + function(User $user) { |
|
212 | 212 | return sprintf( |
213 | 213 | '%s %s <%s>', |
214 | 214 | $user->getFirstName(), |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $results = array_merge( |
222 | 222 | $results, |
223 | 223 | $this->getGroups()->map( |
224 | - function (Group $group) use (&$results) { |
|
224 | + function(Group $group) use (&$results) { |
|
225 | 225 | return sprintf( |
226 | 226 | '%s (group)', |
227 | 227 | $group->getName() |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | // get user emails |
21 | 21 | $emails = $recipientList->getUsers()->map( |
22 | - function (EmailHolderInterface $user) { |
|
22 | + function(EmailHolderInterface $user) { |
|
23 | 23 | return $user->getEmail(); |
24 | 24 | } |
25 | 25 | ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | protected function addGroupUsersEmails(ArrayCollection $emails, RecipientList $recipientList) |
42 | 42 | { |
43 | 43 | $groupIds = $recipientList->getGroups()->map( |
44 | - function ($group) { |
|
44 | + function($group) { |
|
45 | 45 | return $group->getId(); |
46 | 46 | } |
47 | 47 | )->toArray(); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | ->getResult(); |
61 | 61 | |
62 | 62 | array_map( |
63 | - function ($groupEmail) use ($emails) { |
|
63 | + function($groupEmail) use ($emails) { |
|
64 | 64 | $emails->add($groupEmail['email']); |
65 | 65 | }, |
66 | 66 | $groupUsers |
@@ -136,9 +136,9 @@ |
||
136 | 136 | $fieldLabel = $this->getFieldLabel($entityName, $fieldName); |
137 | 137 | |
138 | 138 | if (array_key_exists(EmailHolderInterface::class, class_implements($mapping['targetEntity']))) { |
139 | - $fieldPath = ($currentPath ? implode('.', $currentPath).'.' : ''). $fieldName; |
|
139 | + $fieldPath = ($currentPath ? implode('.', $currentPath) . '.' : '') . $fieldName; |
|
140 | 140 | $fieldLabelPath = |
141 | - ($currentLabelPath ? implode(self::LABEL_GLUE, $currentLabelPath).self::LABEL_GLUE : ''). |
|
141 | + ($currentLabelPath ? implode(self::LABEL_GLUE, $currentLabelPath) . self::LABEL_GLUE : '') . |
|
142 | 142 | $fieldLabel; |
143 | 143 | $choices[$fieldPath] = $fieldLabelPath; |
144 | 144 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | 'label' => 'oro.notification.emailnotification.event.label', |
86 | 86 | 'class' => 'OroNotificationBundle:Event', |
87 | 87 | 'property' => 'name', |
88 | - 'query_builder' => function (EntityRepository $er) { |
|
88 | + 'query_builder' => function(EntityRepository $er) { |
|
89 | 89 | return $er->createQueryBuilder('c')->orderBy('c.name', 'ASC'); |
90 | 90 | }, |
91 | 91 | 'configs' => [ |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | { |
146 | 146 | $view->vars['listenChangeElements'] = array_filter( |
147 | 147 | array_map( |
148 | - function (FormView $view) { |
|
148 | + function(FormView $view) { |
|
149 | 149 | if ($view->vars['name'] === 'entityName') { |
150 | 150 | return '#' . $view->vars['id']; |
151 | 151 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | $emails = array_map( |
109 | - function (EmailHolderInterface $entity) { |
|
109 | + function(EmailHolderInterface $entity) { |
|
110 | 110 | return $entity->getEmail(); |
111 | 111 | }, |
112 | 112 | $entities |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | // Recursively leave only string values |
135 | 135 | array_walk_recursive( |
136 | 136 | $values, |
137 | - function (&$item) { |
|
137 | + function(&$item) { |
|
138 | 138 | if ($item instanceof EmailHolderInterface) { |
139 | 139 | $item = $item->getEmail(); |
140 | 140 | } |
@@ -224,10 +224,10 @@ |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | if ($audit->getVersion() < 2) { |
227 | - return $defaultAction ? : AbstractAudit::ACTION_CREATE; |
|
227 | + return $defaultAction ?: AbstractAudit::ACTION_CREATE; |
|
228 | 228 | } |
229 | 229 | |
230 | - return $defaultAction ? : AbstractAudit::ACTION_UPDATE; |
|
230 | + return $defaultAction ?: AbstractAudit::ACTION_UPDATE; |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
@@ -240,7 +240,7 @@ |
||
240 | 240 | |
241 | 241 | return array_filter( |
242 | 242 | $this->getAclManager()->getAceProvider()->getAces($acl, $accessControlEntryType, null), |
243 | - function ($accessControlEntry) use (&$securityIdentity) { |
|
243 | + function($accessControlEntry) use (&$securityIdentity) { |
|
244 | 244 | /** @var EntryInterface $accessControlEntry */ |
245 | 245 | return $securityIdentity->equals($accessControlEntry->getSecurityIdentity()); |
246 | 246 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | private function resolveVersionsMysql() |
56 | 56 | { |
57 | 57 | while (true) { |
58 | - $sql = 'SELECT object_id, REPLACE(object_class, \'OroCRM\', \'Oro\') AS object_class FROM oro_audit '. |
|
58 | + $sql = 'SELECT object_id, REPLACE(object_class, \'OroCRM\', \'Oro\') AS object_class FROM oro_audit ' . |
|
59 | 59 | 'GROUP BY object_id, REPLACE(object_class, \'OroCRM\', \'Oro\'), version HAVING COUNT(*) > 1 LIMIT 100'; |
60 | 60 | $rows = $this->connection->fetchAll($sql); |
61 | 61 | if (!$rows) { |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | foreach ($rows as $row) { |
66 | - $sql = 'SET @version = -1;'. |
|
67 | - 'UPDATE oro_audit SET version = @version:=@version+1 '. |
|
68 | - 'WHERE object_id = :object_id AND '. |
|
66 | + $sql = 'SET @version = -1;' . |
|
67 | + 'UPDATE oro_audit SET version = @version:=@version+1 ' . |
|
68 | + 'WHERE object_id = :object_id AND ' . |
|
69 | 69 | 'REPLACE(object_class, \'OroCRM\', \'Oro\') = :object_class ORDER BY id ASC;'; |
70 | 70 | |
71 | 71 | $this->connection->executeUpdate( |