@@ -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 |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | */ |
217 | 217 | protected function getVisibleFields() |
218 | 218 | { |
219 | - return $this->getFields()->filter(function (AbstractAuditField $field) { |
|
219 | + return $this->getFields()->filter(function(AbstractAuditField $field) { |
|
220 | 220 | return $field->isVisible(); |
221 | 221 | }); |
222 | 222 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | */ |
231 | 231 | public function getField($field) |
232 | 232 | { |
233 | - return $this->getFields()->filter(function (AbstractAuditField $auditField) use ($field) { |
|
233 | + return $this->getFields()->filter(function(AbstractAuditField $auditField) use ($field) { |
|
234 | 234 | return $auditField->getField() === $field; |
235 | 235 | })->first(); |
236 | 236 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | ->expects(self::once()) |
116 | 116 | ->method('runUnique') |
117 | 117 | ->with($messageId, $jobName) |
118 | - ->will(self::returnCallback(function ($ownerId, $name, $callback) use ($jobRunner) { |
|
118 | + ->will(self::returnCallback(function($ownerId, $name, $callback) use ($jobRunner) { |
|
119 | 119 | $callback($jobRunner); |
120 | 120 | |
121 | 121 | return true; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ->expects(self::once()) |
125 | 125 | ->method('createDelayed') |
126 | 126 | ->with($jobName . '.delayed') |
127 | - ->will(self::returnCallback(function ($name, $callback) use ($jobRunner, $jobId) { |
|
127 | + ->will(self::returnCallback(function($name, $callback) use ($jobRunner, $jobId) { |
|
128 | 128 | $job = new Job(); |
129 | 129 | $job->setId($jobId); |
130 | 130 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ->expects(self::once()) |
41 | 41 | ->method('info') |
42 | 42 | ->with( |
43 | - 'Ran command '.$testCommandName.'. Got output '.$testCommandOutput, |
|
43 | + 'Ran command ' . $testCommandName . '. Got output ' . $testCommandOutput, |
|
44 | 44 | [ |
45 | 45 | 'command' => $testCommandName, |
46 | 46 | 'arguments' => [], |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $jobRunner |
53 | 53 | ->expects(self::once()) |
54 | 54 | ->method('runDelayed') |
55 | - ->will(self::returnCallback(function ($ownerId, $callback) use ($jobRunner) { |
|
55 | + ->will(self::returnCallback(function($ownerId, $callback) use ($jobRunner) { |
|
56 | 56 | $callback($jobRunner); |
57 | 57 | |
58 | 58 | return true; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | ->expects(self::once()) |
88 | 88 | ->method('info') |
89 | 89 | ->with( |
90 | - 'Ran command '.$testCommandName.'. Got output '.$testCommandOutput, |
|
90 | + 'Ran command ' . $testCommandName . '. Got output ' . $testCommandOutput, |
|
91 | 91 | [ |
92 | 92 | 'command' => $testCommandName, |
93 | 93 | 'arguments' => $testArguments, |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $jobRunner |
100 | 100 | ->expects(self::once()) |
101 | 101 | ->method('runDelayed') |
102 | - ->will(self::returnCallback(function ($ownerId, $callback) use ($jobRunner) { |
|
102 | + ->will(self::returnCallback(function($ownerId, $callback) use ($jobRunner) { |
|
103 | 103 | $callback($jobRunner); |
104 | 104 | |
105 | 105 | return true; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | $jobName = sprintf('oro:cron:run_command:%s', $body['command']); |
91 | 91 | if ($commandArguments) { |
92 | - array_walk($commandArguments, function ($item, $key) use (&$jobName) { |
|
92 | + array_walk($commandArguments, function($item, $key) use (&$jobName) { |
|
93 | 93 | if (is_array($item)) { |
94 | 94 | $item = implode(',', $item); |
95 | 95 | } |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | }); |
99 | 99 | } |
100 | 100 | |
101 | - $result = $this->jobRunner->runUnique( |
|
101 | + $result = $this->jobRunner->runUnique( |
|
102 | 102 | $ownerId, |
103 | 103 | $jobName, |
104 | - function (JobRunner $jobRunner) use ($body, $commandArguments, $jobName) { |
|
104 | + function(JobRunner $jobRunner) use ($body, $commandArguments, $jobName) { |
|
105 | 105 | $jobRunner->createDelayed( |
106 | 106 | $jobName . '.delayed', |
107 | - function (JobRunner $jobRunner, Job $child) use ($body) { |
|
107 | + function(JobRunner $jobRunner, Job $child) use ($body) { |
|
108 | 108 | $body['jobId'] = $child->getId(); |
109 | 109 | $this->producer->send( |
110 | 110 | Topics::RUN_COMMAND_DELAYED, |
@@ -90,7 +90,7 @@ |
||
90 | 90 | { |
91 | 91 | $result = $this->jobRunner->runDelayed( |
92 | 92 | $body['jobId'], |
93 | - function () use ($commandName, $commandArguments) { |
|
93 | + function() use ($commandName, $commandArguments) { |
|
94 | 94 | $output = $this->commandRunner->run($commandName, $commandArguments); |
95 | 95 | $this->logger->info( |
96 | 96 | sprintf( |
@@ -84,12 +84,12 @@ |
||
84 | 84 | ->willReturn(true); |
85 | 85 | $this->translator->expects(self::any()) |
86 | 86 | ->method('trans') |
87 | - ->willReturnCallback(function ($label) { |
|
87 | + ->willReturnCallback(function($label) { |
|
88 | 88 | return 'trans' . $label; |
89 | 89 | }); |
90 | 90 | $this->assetHelper->expects(self::any()) |
91 | 91 | ->method('getUrl') |
92 | - ->willReturnCallback(function ($icon) { |
|
92 | + ->willReturnCallback(function($icon) { |
|
93 | 93 | return '/' . $icon; |
94 | 94 | }); |
95 | 95 |