@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | protected function prepareConfiguration($gridName) |
| 122 | 122 | { |
| 123 | - $id = (int) (substr($gridName, strlen(Report::GRID_PREFIX))); |
|
| 123 | + $id = (int)(substr($gridName, strlen(Report::GRID_PREFIX))); |
|
| 124 | 124 | $repo = $this->doctrine->getRepository('OroReportBundle:Report'); |
| 125 | 125 | $report = $repo->find($id); |
| 126 | 126 | |
@@ -139,6 +139,6 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | private function getCacheKey($gridName) |
| 141 | 141 | { |
| 142 | - return $this->prefixCacheKey.'.'.$gridName; |
|
| 142 | + return $this->prefixCacheKey . '.' . $gridName; |
|
| 143 | 143 | } |
| 144 | 144 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | { |
| 36 | 36 | $resolver->setDefaults( |
| 37 | 37 | array( |
| 38 | - 'chart_filter' => function ($chartConfig) { |
|
| 38 | + 'chart_filter' => function($chartConfig) { |
|
| 39 | 39 | return !empty($chartConfig['default_settings']['available_in_reports']); |
| 40 | 40 | } |
| 41 | 41 | ) |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | protected function clearCache(Report $entity) |
| 52 | 52 | { |
| 53 | - $key = $this->prefixCacheKey.'.'.$entity->getGridPrefix().$entity->getId(); |
|
| 53 | + $key = $this->prefixCacheKey . '.' . $entity->getGridPrefix() . $entity->getId(); |
|
| 54 | 54 | |
| 55 | 55 | if ($this->reportCacheManager->contains($key)) { |
| 56 | 56 | $this->reportCacheManager->delete($key); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | IntlTestHelper::requireIntl($this); |
| 30 | 30 | |
| 31 | - $this->translator = $this->createMock('Symfony\Component\Translation\TranslatorInterface'); |
|
| 31 | + $this->translator = $this->createMock('Symfony\Component\Translation\TranslatorInterface'); |
|
| 32 | 32 | $this->configManager = $this->getMockBuilder('Oro\Bundle\ConfigBundle\Config\ConfigManager') |
| 33 | 33 | ->disableOriginalConstructor()->getMock(); |
| 34 | 34 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | */ |
| 234 | 234 | protected function getNotBlankValidator($message) |
| 235 | 235 | { |
| 236 | - return function ($value) use ($message) { |
|
| 236 | + return function($value) use ($message) { |
|
| 237 | 237 | if (strlen(trim($value)) === 0) { |
| 238 | 238 | throw new \Exception($message); |
| 239 | 239 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $emailValidator = $this->getNotBlankValidator('The email must be specified'); |
| 253 | 253 | $firstNameValidator = $this->getNotBlankValidator('The first name must be specified'); |
| 254 | 254 | $lastNameValidator = $this->getNotBlankValidator('The last name must be specified'); |
| 255 | - $passwordValidator = function ($value) { |
|
| 255 | + $passwordValidator = function($value) { |
|
| 256 | 256 | if (strlen(trim($value)) < 2) { |
| 257 | 257 | throw new \Exception('The password must be at least 2 characters long'); |
| 258 | 258 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | /** @var ConfigManager $configManager */ |
| 327 | 327 | $configManager = $this->getContainer()->get('oro_config.global'); |
| 328 | 328 | $defaultOrganizationName = $configManager->get('oro_ui.organization_name'); |
| 329 | - $organizationNameValidator = function ($value) use (&$defaultOrganizationName) { |
|
| 329 | + $organizationNameValidator = function($value) use (&$defaultOrganizationName) { |
|
| 330 | 330 | $len = strlen(trim($value)); |
| 331 | 331 | if ($len === 0 && empty($defaultOrganizationName)) { |
| 332 | 332 | throw new \Exception('The organization name must not be empty'); |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | { |
| 269 | 269 | return $this->filterDocs( |
| 270 | 270 | $this->getExtractor()->all(self::VIEW), |
| 271 | - function (Route $route) use ($entityType, $action) { |
|
| 271 | + function(Route $route) use ($entityType, $action) { |
|
| 272 | 272 | return |
| 273 | 273 | $route->getDefault('entity') === $entityType |
| 274 | 274 | && $route->getDefault('_action') === $action; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $statusCalculatorResolver |
| 33 | 33 | ->method('getCalculatorForRootJob') |
| 34 | 34 | ->willReturnCallback( |
| 35 | - function (Job $rootJob) use ($statusCalculator) { |
|
| 35 | + function(Job $rootJob) use ($statusCalculator) { |
|
| 36 | 36 | $statusCalculator->init($rootJob); |
| 37 | 37 | return $statusCalculator; |
| 38 | 38 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $this->jobStorage->expects(self::once()) |
| 87 | 87 | ->method('saveJob') |
| 88 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 88 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 89 | 89 | $callback($job); |
| 90 | 90 | }); |
| 91 | 91 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | $this->jobStorage->expects(self::once()) |
| 113 | 113 | ->method('saveJob') |
| 114 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 114 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 115 | 115 | $callback($job); |
| 116 | 116 | }); |
| 117 | 117 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | $this->jobStorage->expects(self::once()) |
| 137 | 137 | ->method('saveJob') |
| 138 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 138 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 139 | 139 | $callback($job); |
| 140 | 140 | }); |
| 141 | 141 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | $this->jobStorage->expects(self::once()) |
| 159 | 159 | ->method('saveJob') |
| 160 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 160 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 161 | 161 | $callback($job); |
| 162 | 162 | }); |
| 163 | 163 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | $this->jobStorage->expects(self::once()) |
| 185 | 185 | ->method('saveJob') |
| 186 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 186 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 187 | 187 | $callback($job); |
| 188 | 188 | }); |
| 189 | 189 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $this->jobStorage->expects(self::once()) |
| 214 | 214 | ->method('saveJob') |
| 215 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 215 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 216 | 216 | $callback($job); |
| 217 | 217 | }); |
| 218 | 218 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | $this->jobStorage->expects(self::once()) |
| 243 | 243 | ->method('saveJob') |
| 244 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 244 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 245 | 245 | $callback($job); |
| 246 | 246 | }); |
| 247 | 247 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | $this->jobStorage->expects(self::once()) |
| 272 | 272 | ->method('saveJob') |
| 273 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 273 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 274 | 274 | $callback($job); |
| 275 | 275 | }); |
| 276 | 276 | |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | |
| 300 | 300 | $this->jobStorage->expects(self::once()) |
| 301 | 301 | ->method('saveJob') |
| 302 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 302 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 303 | 303 | $callback($job); |
| 304 | 304 | }); |
| 305 | 305 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | |
| 329 | 329 | $this->jobStorage->expects(self::once()) |
| 330 | 330 | ->method('saveJob') |
| 331 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 331 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 332 | 332 | $callback($job); |
| 333 | 333 | }); |
| 334 | 334 | |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | |
| 358 | 358 | $this->jobStorage->expects(self::once()) |
| 359 | 359 | ->method('saveJob') |
| 360 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 360 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 361 | 361 | $callback($job); |
| 362 | 362 | }); |
| 363 | 363 | |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | |
| 398 | 398 | $this->jobStorage->expects(self::once()) |
| 399 | 399 | ->method('saveJob') |
| 400 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 400 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 401 | 401 | $callback($job); |
| 402 | 402 | }); |
| 403 | 403 | |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | |
| 422 | 422 | $this->jobStorage->expects(self::once()) |
| 423 | 423 | ->method('saveJob') |
| 424 | - ->willReturnCallback(function (Job $job, $callback) { |
|
| 424 | + ->willReturnCallback(function(Job $job, $callback) { |
|
| 425 | 425 | $callback($job); |
| 426 | 426 | }); |
| 427 | 427 | |
@@ -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 | })); |