@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | $rootStopped = false; |
| 49 | 49 | $statusAndProgressCalculator = $this->statusCalculatorResolver->getCalculatorForRootJob($rootJob); |
| 50 | - $this->jobStorage->saveJob($rootJob, function (Job $rootJob) use ( |
|
| 50 | + $this->jobStorage->saveJob($rootJob, function(Job $rootJob) use ( |
|
| 51 | 51 | &$rootStopped, |
| 52 | 52 | $calculateProgress, |
| 53 | 53 | $statusAndProgressCalculator |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $this->assertEquals( |
| 76 | 76 | [ |
| 77 | - ['class' => 'stdClass1','entityIds' => [48 => 48]], |
|
| 78 | - ['class' => 'stdClass2','entityIds' => [54 => 54]], |
|
| 77 | + ['class' => 'stdClass1', 'entityIds' => [48 => 48]], |
|
| 78 | + ['class' => 'stdClass2', 'entityIds' => [54 => 54]], |
|
| 79 | 79 | ], |
| 80 | 80 | $this->transformer->transform($entities) |
| 81 | 81 | ); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | $this->doctrineHelper->expects($this->exactly($entitiesCount)) |
| 94 | 94 | ->method('getSingleEntityIdentifier') |
| 95 | - ->will($this->returnCallback(function () { |
|
| 95 | + ->will($this->returnCallback(function() { |
|
| 96 | 96 | static $id = 0; |
| 97 | 97 | return $id++; |
| 98 | 98 | })); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | $this->doctrineHelper->expects($this->exactly($entitiesCount)) |
| 120 | 120 | ->method('getSingleEntityIdentifier') |
| 121 | - ->will($this->returnCallback(function () { |
|
| 121 | + ->will($this->returnCallback(function() { |
|
| 122 | 122 | static $id = 0; |
| 123 | 123 | return $id++; |
| 124 | 124 | })); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function splitFile($pathFile) |
| 78 | 78 | { |
| 79 | - if (! ($this->writer && $this->reader)) { |
|
| 79 | + if (!($this->writer && $this->reader)) { |
|
| 80 | 80 | throw new InvalidConfigurationException('Reader and Writer must be configured.'); |
| 81 | 81 | } |
| 82 | 82 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function mergeFiles(array $files, $summaryFile) |
| 146 | 146 | { |
| 147 | - if (! ($this->writer && $this->reader)) { |
|
| 147 | + if (!($this->writer && $this->reader)) { |
|
| 148 | 148 | throw new InvalidConfigurationException('Reader and Writer must be configured.'); |
| 149 | 149 | } |
| 150 | 150 | $contextWriter = null; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $items = []; |
| 156 | 156 | $i = 0; |
| 157 | 157 | while ($item = $this->reader->read($contextReader)) { |
| 158 | - if (! $contextWriter) { |
|
| 158 | + if (!$contextWriter) { |
|
| 159 | 159 | $contextWriter = new Context( |
| 160 | 160 | [ |
| 161 | 161 | 'filePath' => $summaryFile, |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $fileLocator = $this->createMock(FileLocator::class); |
| 20 | 20 | $fileLocator->expects(self::any()) |
| 21 | 21 | ->method('locate') |
| 22 | - ->willReturnCallback(function ($resource) use ($fixturesDir) { |
|
| 22 | + ->willReturnCallback(function($resource) use ($fixturesDir) { |
|
| 23 | 23 | return str_replace( |
| 24 | 24 | '@OroApiBundle/Tests/Unit/ApiDoc/Parser/Fixtures', |
| 25 | 25 | $fixturesDir, |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $currentTime = new \DateTime('now', new \DateTimeZone('UTC')); |
| 46 | 46 | if (!$this->lastUpdatedTime |
| 47 | 47 | || ( |
| 48 | - ($currentTime->getTimestamp() - $this->lastUpdatedTime->getTimestamp())/60 |
|
| 48 | + ($currentTime->getTimestamp() - $this->lastUpdatedTime->getTimestamp()) / 60 |
|
| 49 | 49 | >= $this->updateHeartbeatPeriod |
| 50 | 50 | ) |
| 51 | 51 | ) { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | ] |
| 176 | 176 | )); |
| 177 | 177 | $this->template = tempnam( |
| 178 | - $this->getKernel()->getRootDir().DIRECTORY_SEPARATOR.'import_export', |
|
| 178 | + $this->getKernel()->getRootDir() . DIRECTORY_SEPARATOR . 'import_export', |
|
| 179 | 179 | 'import_template_' |
| 180 | 180 | ); |
| 181 | 181 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | public function iFillTemplateWithData(TableNode $table) |
| 370 | 370 | { |
| 371 | 371 | $this->importFile = tempnam( |
| 372 | - $this->getKernel()->getRootDir().DIRECTORY_SEPARATOR.'import_export', |
|
| 372 | + $this->getKernel()->getRootDir() . DIRECTORY_SEPARATOR . 'import_export', |
|
| 373 | 373 | 'import_data_' |
| 374 | 374 | ); |
| 375 | 375 | $fp = fopen($this->importFile, 'w'); |
@@ -434,12 +434,12 @@ discard block |
||
| 434 | 434 | $fileManager = $this->getContainer()->get('oro_importexport.file.file_manager'); |
| 435 | 435 | $files = $fileManager->getFilesByPeriod(); |
| 436 | 436 | |
| 437 | - $exportFiles = array_filter($files, function (File $file) { |
|
| 437 | + $exportFiles = array_filter($files, function(File $file) { |
|
| 438 | 438 | return preg_match('/export_\d{4}.*.csv/', $file->getName()); |
| 439 | 439 | }); |
| 440 | 440 | |
| 441 | 441 | // sort by modification date |
| 442 | - usort($exportFiles, function (File $a, File $b) { |
|
| 442 | + usort($exportFiles, function(File $a, File $b) { |
|
| 443 | 443 | return $b->getMtime() > $a->getMtime(); |
| 444 | 444 | }); |
| 445 | 445 | |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $importSubmitButton = $this->createElement('ImportModalImportFileButton'); |
| 490 | 490 | |
| 491 | 491 | if (false === $importSubmitButton->isIsset()) { |
| 492 | - $mainImportButton =$this->createElement('MainImportFileButton'); |
|
| 492 | + $mainImportButton = $this->createElement('MainImportFileButton'); |
|
| 493 | 493 | self::assertNotNull($mainImportButton, 'Main import button was not found'); |
| 494 | 494 | $mainImportButton->click(); |
| 495 | 495 | $this->waitForAjax(); |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | 'allow_delete' => true, |
| 30 | 30 | ]); |
| 31 | 31 | |
| 32 | - $resolver->setNormalizer('entry_type', function () { |
|
| 32 | + $resolver->setNormalizer('entry_type', function() { |
|
| 33 | 33 | return new LocalizedFallbackValueTypeStub(); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | - $resolver->setNormalizer('entry_options', function () { |
|
| 36 | + $resolver->setNormalizer('entry_options', function() { |
|
| 37 | 37 | return []; |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -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 | QueryBuilderUtil::checkField($sortKey); |
| 173 | 173 | $datasource->getQueryBuilder() |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | public function getActionConfigurationClosure($actions) |
| 301 | 301 | { |
| 302 | - return function (ResultRecord $record) use ($actions) { |
|
| 302 | + return function(ResultRecord $record) use ($actions) { |
|
| 303 | 303 | $result = []; |
| 304 | 304 | foreach ($actions as $action => $filters) { |
| 305 | 305 | $isApplicable = true; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | { |
| 170 | 170 | $results = array_filter(explode(' ', $value), 'strlen'); |
| 171 | 171 | $results = array_map( |
| 172 | - function ($word) use ($searchCondition) { |
|
| 172 | + function($word) use ($searchCondition) { |
|
| 173 | 173 | if ($searchCondition === Query::OPERATOR_CONTAINS && filter_var($word, FILTER_VALIDATE_EMAIL)) { |
| 174 | 174 | $word = sprintf('"%s"', $word); |
| 175 | 175 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | $words = array_filter( |
| 197 | 197 | $words, |
| 198 | - function ($value) use ($length) { |
|
| 198 | + function($value) use ($length) { |
|
| 199 | 199 | if (filter_var($value, FILTER_VALIDATE_INT)) { |
| 200 | 200 | return true; |
| 201 | 201 | } |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | foreach (array_values($words) as $key => $value) { |
| 299 | 299 | $valueParameter = 'value' . $index . '_w' . $key; |
| 300 | 300 | QueryBuilderUtil::checkIdentifier($valueParameter); |
| 301 | - $result->add($qb->expr()->like($joinAlias. '.value', ':' . $valueParameter)); |
|
| 301 | + $result->add($qb->expr()->like($joinAlias . '.value', ':' . $valueParameter)); |
|
| 302 | 302 | $qb->setParameter($valueParameter, "%$value%"); |
| 303 | 303 | } |
| 304 | 304 | if ($this->isConcreteField($fieldName) && !$this->isAllDataField($fieldName)) { |