@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function getReferenceValue($identifier) |
| 37 | 37 | { |
| 38 | - switch(substr($identifier, 5)) { |
|
| 38 | + switch (substr($identifier, 5)) { |
|
| 39 | 39 | case 'iteration': |
| 40 | 40 | $current = end($this->stack); |
| 41 | 41 | return $current['step']; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | public function sortField2Hash($value) |
| 41 | 41 | { |
| 42 | 42 | $ref = new \ReflectionClass('eZ\Publish\API\Repository\Values\Content\Location'); |
| 43 | - foreach($ref->getConstants() as $key => $val) { |
|
| 43 | + foreach ($ref->getConstants() as $key => $val) { |
|
| 44 | 44 | if (strpos($key, 'SORT_FIELD_') === 0 && $val == $value) { |
| 45 | 45 | $out = strtolower(substr($key, 11)); |
| 46 | 46 | if ($out == 'contentobject_id') { |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | |
| 150 | 150 | protected function versionStatusToHash($status) |
| 151 | 151 | { |
| 152 | - foreach(ContentVersionMatcher::STATUS_MAP as $own => $ez) { |
|
| 152 | + foreach (ContentVersionMatcher::STATUS_MAP as $own => $ez) { |
|
| 153 | 153 | if ($status == $ez) { |
| 154 | 154 | return $own; |
| 155 | 155 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | public static function forceSigchildEnabled($force) |
| 16 | 16 | { |
| 17 | - self::$forceSigchildEnabled = (bool) $force; |
|
| 17 | + self::$forceSigchildEnabled = (bool)$force; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | protected function isSigchildEnabled() |
@@ -22,23 +22,23 @@ |
||
| 22 | 22 | public function getProcess() |
| 23 | 23 | { |
| 24 | 24 | $parentClass = get_parent_class($this); |
| 25 | - $this_prefix = \Closure::bind(function(ProcessBuilder $builder){return $builder->prefix;}, null, $parentClass); |
|
| 25 | + $this_prefix = \Closure::bind(function(ProcessBuilder $builder) {return $builder->prefix; }, null, $parentClass); |
|
| 26 | 26 | $this_prefix = $this_prefix($this); |
| 27 | - $this_arguments = \Closure::bind(function(ProcessBuilder $builder){return $builder->arguments;}, null, $parentClass); |
|
| 27 | + $this_arguments = \Closure::bind(function(ProcessBuilder $builder) {return $builder->arguments; }, null, $parentClass); |
|
| 28 | 28 | $this_arguments = $this_arguments($this); |
| 29 | - $this_options = \Closure::bind(function(ProcessBuilder $builder){return $builder->options;}, null, $parentClass); |
|
| 29 | + $this_options = \Closure::bind(function(ProcessBuilder $builder) {return $builder->options; }, null, $parentClass); |
|
| 30 | 30 | $this_options = $this_options($this); |
| 31 | - $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder){return $builder->inheritEnv;}, null, $parentClass); |
|
| 31 | + $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder) {return $builder->inheritEnv; }, null, $parentClass); |
|
| 32 | 32 | $this_inheritEnv = $this_inheritEnv($this); |
| 33 | - $this_env = \Closure::bind(function(ProcessBuilder $builder){return $builder->env;}, null, $parentClass); |
|
| 33 | + $this_env = \Closure::bind(function(ProcessBuilder $builder) {return $builder->env; }, null, $parentClass); |
|
| 34 | 34 | $this_env = $this_env($this); |
| 35 | - $this_cwd = \Closure::bind(function(ProcessBuilder $builder){return $builder->cwd;}, null, $parentClass); |
|
| 35 | + $this_cwd = \Closure::bind(function(ProcessBuilder $builder) {return $builder->cwd; }, null, $parentClass); |
|
| 36 | 36 | $this_cwd = $this_cwd($this); |
| 37 | - $this_input = \Closure::bind(function(ProcessBuilder $builder){return $builder->input;}, null, $parentClass); |
|
| 37 | + $this_input = \Closure::bind(function(ProcessBuilder $builder) {return $builder->input; }, null, $parentClass); |
|
| 38 | 38 | $this_input = $this_input($this); |
| 39 | - $this_timeout = \Closure::bind(function(ProcessBuilder $builder){return $builder->timeout;}, null, $parentClass); |
|
| 39 | + $this_timeout = \Closure::bind(function(ProcessBuilder $builder) {return $builder->timeout; }, null, $parentClass); |
|
| 40 | 40 | $this_timeout = $this_timeout($this); |
| 41 | - $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder){return $builder->outputDisabled;}, null, $parentClass); |
|
| 41 | + $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder) {return $builder->outputDisabled; }, null, $parentClass); |
|
| 42 | 42 | $this_outputDisabled = $this_outputDisabled($this); |
| 43 | 43 | |
| 44 | 44 | if (0 === count($this_prefix) && 0 === count($this_arguments)) { |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | $this->errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL); |
| 79 | 79 | $this->errOutput->writeln($message, $type); |
| 80 | 80 | $this->errOutput->setVerbosity(OutputInterface::VERBOSITY_QUIET); |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->errOutput->writeln($message, $type); |
| 85 | 84 | } |
@@ -94,13 +94,13 @@ |
||
| 94 | 94 | protected function normalizePaths($paths) |
| 95 | 95 | { |
| 96 | 96 | $rootDir = realpath($this->getContainer()->get('kernel')->getRootDir() . '/..') . '/'; |
| 97 | - foreach($paths as $i => $path) { |
|
| 97 | + foreach ($paths as $i => $path) { |
|
| 98 | 98 | if ($path === $rootDir || $path === './') { |
| 99 | 99 | $paths[$i] = './'; |
| 100 | 100 | } else if (strpos($path, './') === 0) { |
| 101 | 101 | $paths[$i] = substr($path, 2); |
| 102 | 102 | // q: should we also call realpath on $path? what if there are symlinks at play? |
| 103 | - } elseif (strpos($path, $rootDir) === 0 ) { |
|
| 103 | + } elseif (strpos($path, $rootDir) === 0) { |
|
| 104 | 104 | $paths[$i] = substr($path, strlen($rootDir)); |
| 105 | 105 | } elseif ($path === '') { |
| 106 | 106 | unset($paths[$i]); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | // sort tags by depth so that there will be no errors in case we are deleting parent and child |
| 163 | 163 | $tagsCollection = $tagsCollection->getArrayCopy(); |
| 164 | - uasort($tagsCollection, function ($t1, $t2) { |
|
| 164 | + uasort($tagsCollection, function($t1, $t2) { |
|
| 165 | 165 | if ($t1->depth == $t2->depth) return 0; |
| 166 | 166 | return ($t1->depth > $t2->depth) ? -1 : 1; |
| 167 | 167 | }); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | case 'create': |
| 267 | 267 | // sort top to bottom |
| 268 | 268 | $tagCollection = $tagCollection->getArrayCopy(); |
| 269 | - uasort($tagCollection, function ($t1, $t2) { |
|
| 269 | + uasort($tagCollection, function($t1, $t2) { |
|
| 270 | 270 | if ($t1->depth == $t2->depth) return 0; |
| 271 | 271 | return ($t1->depth > $t2->depth) ? 1 : -1; |
| 272 | 272 | }); |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | case 'delete': |
| 275 | 275 | // sort bottom to top |
| 276 | 276 | $tagCollection = $tagCollection->getArrayCopy(); |
| 277 | - uasort($tagCollection, function ($t1, $t2) { |
|
| 277 | + uasort($tagCollection, function($t1, $t2) { |
|
| 278 | 278 | if ($t1->depth == $t2->depth) return 0; |
| 279 | 279 | return ($t1->depth > $t2->depth) ? -1 : 1; |
| 280 | 280 | }); |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | protected function getTagKeywords($tag) |
| 353 | 353 | { |
| 354 | 354 | $out = array(); |
| 355 | - foreach($tag->languageCodes as $languageCode) { |
|
| 355 | + foreach ($tag->languageCodes as $languageCode) { |
|
| 356 | 356 | $out[$languageCode] = $tag->getKeyword($languageCode); |
| 357 | 357 | } |
| 358 | 358 | return $out; |
@@ -162,7 +162,9 @@ discard block |
||
| 162 | 162 | // sort tags by depth so that there will be no errors in case we are deleting parent and child |
| 163 | 163 | $tagsCollection = $tagsCollection->getArrayCopy(); |
| 164 | 164 | uasort($tagsCollection, function ($t1, $t2) { |
| 165 | - if ($t1->depth == $t2->depth) return 0; |
|
| 165 | + if ($t1->depth == $t2->depth) { |
|
| 166 | + return 0; |
|
| 167 | + } |
|
| 166 | 168 | return ($t1->depth > $t2->depth) ? -1 : 1; |
| 167 | 169 | }); |
| 168 | 170 | |
@@ -267,7 +269,9 @@ discard block |
||
| 267 | 269 | // sort top to bottom |
| 268 | 270 | $tagCollection = $tagCollection->getArrayCopy(); |
| 269 | 271 | uasort($tagCollection, function ($t1, $t2) { |
| 270 | - if ($t1->depth == $t2->depth) return 0; |
|
| 272 | + if ($t1->depth == $t2->depth) { |
|
| 273 | + return 0; |
|
| 274 | + } |
|
| 271 | 275 | return ($t1->depth > $t2->depth) ? 1 : -1; |
| 272 | 276 | }); |
| 273 | 277 | break; |
@@ -275,7 +279,9 @@ discard block |
||
| 275 | 279 | // sort bottom to top |
| 276 | 280 | $tagCollection = $tagCollection->getArrayCopy(); |
| 277 | 281 | uasort($tagCollection, function ($t1, $t2) { |
| 278 | - if ($t1->depth == $t2->depth) return 0; |
|
| 282 | + if ($t1->depth == $t2->depth) { |
|
| 283 | + return 0; |
|
| 284 | + } |
|
| 279 | 285 | return ($t1->depth > $t2->depth) ? -1 : 1; |
| 280 | 286 | }); |
| 281 | 287 | break; |
@@ -56,7 +56,9 @@ |
||
| 56 | 56 | |
| 57 | 57 | $query = new Query(); |
| 58 | 58 | $query->limit = $this->queryLimit; |
| 59 | - if (isset($query->performCount)) $query->performCount = false; |
|
| 59 | + if (isset($query->performCount)) { |
|
| 60 | + $query->performCount = false; |
|
| 61 | + } |
|
| 60 | 62 | $query->filter = $this->getQueryCriterion($key, $values); |
| 61 | 63 | $results = $this->repository->getTrashService()->findTrashItems($query); |
| 62 | 64 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $fieldValue = array($fieldValue); |
| 42 | 42 | } |
| 43 | 43 | if (!$refsResolved) { |
| 44 | - foreach($fieldValue as $key => $countryValue) { |
|
| 44 | + foreach ($fieldValue as $key => $countryValue) { |
|
| 45 | 45 | $fieldValue[$key] = $this->referenceResolver->resolveReference($countryValue); |
| 46 | 46 | } |
| 47 | 47 | } |