@@ -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( |
@@ -98,7 +98,7 @@ |
||
98 | 98 | . ' FROM oro_entity_config AS oec' |
99 | 99 | . ' WHERE oec.class_name = :class' |
100 | 100 | . ' ))'; |
101 | - $dropFieldSql = 'DELETE FROM oro_entity_config_field' |
|
101 | + $dropFieldSql = 'DELETE FROM oro_entity_config_field' |
|
102 | 102 | . ' WHERE field_name = :field' |
103 | 103 | . ' AND entity_id IN (' |
104 | 104 | . ' SELECT id' |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $field->expects($this->once()) |
36 | 36 | ->method('getName') |
37 | 37 | ->willReturn('test_field'); |
38 | - $field->expects($this->exactly((int) $isFieldAuditable)) |
|
38 | + $field->expects($this->exactly((int)$isFieldAuditable)) |
|
39 | 39 | ->method('addOption') |
40 | 40 | ->with(EntityStructureOptionsListener::OPTION_NAME, $isFieldAuditable); |
41 | 41 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $data->expects($this->once()) |
47 | 47 | ->method('getFields') |
48 | 48 | ->willReturn([$field]); |
49 | - $data->expects($this->exactly((int) $isEntityAuditable)) |
|
49 | + $data->expects($this->exactly((int)$isEntityAuditable)) |
|
50 | 50 | ->method('addOption') |
51 | 51 | ->with(EntityStructureOptionsListener::OPTION_NAME, $isEntityAuditable); |
52 | 52 |