@@ -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(); |
@@ -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)) { |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | private function assertEntityFieldContains(Collection $data, string $className, array $expected) |
| 76 | 76 | { |
| 77 | 77 | $expectedIds = array_map( |
| 78 | - function ($entity) { |
|
| 78 | + function($entity) { |
|
| 79 | 79 | return $entity->getId(); |
| 80 | 80 | }, |
| 81 | 81 | $expected |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | 'attr' => [], |
| 89 | 89 | ]); |
| 90 | 90 | |
| 91 | - $resolver->setNormalizer('attr', function (Options $options, $value) { |
|
| 91 | + $resolver->setNormalizer('attr', function(Options $options, $value) { |
|
| 92 | 92 | $value['readonly'] = (count($options['choices']) === 1); |
| 93 | 93 | |
| 94 | 94 | return $value; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $path = $event->getFeature()->getFile(); |
| 52 | 52 | |
| 53 | 53 | $featureFileName = pathinfo($path, PATHINFO_BASENAME); |
| 54 | - $expectedFileName = $this->canonize($featureTitle).'.feature'; |
|
| 54 | + $expectedFileName = $this->canonize($featureTitle) . '.feature'; |
|
| 55 | 55 | |
| 56 | 56 | if ($expectedFileName != $featureFileName) { |
| 57 | 57 | $this->rename($path, $expectedFileName); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | private function rename($featurePath, $newFileName) |
| 118 | 118 | { |
| 119 | 119 | $dir = pathinfo($featurePath, PATHINFO_DIRNAME); |
| 120 | - $newFeaturePath = $dir.DIRECTORY_SEPARATOR.$newFileName; |
|
| 120 | + $newFeaturePath = $dir . DIRECTORY_SEPARATOR . $newFileName; |
|
| 121 | 121 | |
| 122 | 122 | if (is_file($newFeaturePath)) { |
| 123 | 123 | $this->errors[] = sprintf('File "%s" cannot be renamed to "%s"', $featurePath, $newFeaturePath); |
@@ -224,7 +224,7 @@ |
||
| 224 | 224 | private function normalizeLoadedData(): void |
| 225 | 225 | { |
| 226 | 226 | // strip whitespace from the beginning and end of descriptions |
| 227 | - \array_walk_recursive($this->loadedData, function (&$element) { |
|
| 227 | + \array_walk_recursive($this->loadedData, function(&$element) { |
|
| 228 | 228 | if (\is_string($element) && $element) { |
| 229 | 229 | $element = trim($element); |
| 230 | 230 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | $this->tokenAccessor = $this->createMock(TokenAccessorInterface::class); |
| 76 | 76 | $this->entityNameResolver = $this->createMock(EntityNameResolver::class); |
| 77 | 77 | $this->router = $this->createMock(Router::class); |
| 78 | - $this->configManager = $this->createMock(ConfigManager::class); |
|
| 78 | + $this->configManager = $this->createMock(ConfigManager::class); |
|
| 79 | 79 | $emailThreadProvider = $this->createMock(EmailThreadProvider::class); |
| 80 | 80 | $htmlTagHelper = $this->createMock(HtmlTagHelper::class); |
| 81 | 81 | $this->doctrineRegistryLink = $this->createMock(ServiceLink::class); |