@@ -90,6 +90,9 @@ |
||
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $fileName |
|
| 95 | + */ |
|
| 93 | 96 | protected function getClassNameFromFile($fileName) |
| 94 | 97 | { |
| 95 | 98 | $parts = explode('_', pathinfo($fileName, PATHINFO_FILENAME), 2); |
@@ -179,7 +179,7 @@ |
||
| 179 | 179 | * @throws \InvalidArgumentException When trying to set |
| 180 | 180 | * |
| 181 | 181 | * @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType |
| 182 | - * @return boolean |
|
| 182 | + * @return false|null |
|
| 183 | 183 | */ |
| 184 | 184 | protected function setReferences($contentType) |
| 185 | 185 | { |
@@ -287,7 +287,7 @@ |
||
| 287 | 287 | * |
| 288 | 288 | * @param \eZ\Publish\API\Repository\Values\User\Role $role |
| 289 | 289 | * @param \eZ\Publish\API\Repository\RoleService $roleService |
| 290 | - * @param array $policies |
|
| 290 | + * @param array $policy |
|
| 291 | 291 | */ |
| 292 | 292 | private function addPolicy(Role $role, RoleService $roleService, array $policy) |
| 293 | 293 | { |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | // Removing all policies so we can add them back. |
| 80 | 80 | // TODO: Check and update policies instead of remove and add. |
| 81 | 81 | $policies = $role->getPolicies(); |
| 82 | - foreach($policies as $policy) { |
|
| 82 | + foreach ($policies as $policy) { |
|
| 83 | 83 | $roleService->deletePolicy($policy); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - foreach($ymlPolicies as $key => $ymlPolicy) { |
|
| 86 | + foreach ($ymlPolicies as $key => $ymlPolicy) { |
|
| 87 | 87 | $this->addPolicy($role, $roleService, $ymlPolicy); |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | $limitationValue = is_array($limitation['values']) ? $limitation['values'] : array($limitation['values']); |
| 174 | 174 | |
| 175 | - foreach($limitationValue as $id => $value) { |
|
| 175 | + foreach ($limitationValue as $id => $value) { |
|
| 176 | 176 | if ($this->referenceResolver->isReference($value)) { |
| 177 | 177 | $value = $this->geferenceResolver->getReferenceValue($value); |
| 178 | 178 | $limitationValue[$id] = $value; |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * @param $object |
| 69 | - * @return mixed |
|
| 69 | + * @return false|null |
|
| 70 | 70 | */ |
| 71 | 71 | protected function setReferences($object) |
| 72 | 72 | { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | protected $tagService; |
| 14 | 14 | |
| 15 | - public function __construct(TagsService $tagService=null) |
|
| 15 | + public function __construct(TagsService $tagService = null) |
|
| 16 | 16 | { |
| 17 | 17 | $this->tagService = $tagService; |
| 18 | 18 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param string $stringIdentifier |
| 26 | - * @return mixed |
|
| 26 | + * @return integer |
|
| 27 | 27 | */ |
| 28 | 28 | public function isReference($stringIdentifier) |
| 29 | 29 | { |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | public function __construct() |
| 16 | 16 | { |
| 17 | 17 | $quotedPrefixes = []; |
| 18 | - foreach($this->referencePrefixes as $prefix) { |
|
| 18 | + foreach ($this->referencePrefixes as $prefix) { |
|
| 19 | 19 | $quotedPrefixes[] = preg_quote($prefix, '/'); |
| 20 | 20 | } |
| 21 | 21 | $this->prefixMatchRegexp = '/^(' . implode('|', $quotedPrefixes) . ')/'; |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | protected function getReferenceIdentifierByPrefix($stringIdentifier) |
| 57 | 57 | { |
| 58 | - foreach($this->referencePrefixes as $prefix) { |
|
| 58 | + foreach ($this->referencePrefixes as $prefix) { |
|
| 59 | 59 | $regexp = '/^' . preg_quote($prefix, '/') . '/'; |
| 60 | 60 | if (preg_match($regexp, $stringIdentifier)) { |
| 61 | 61 | return array('prefix' => $prefix, 'identifier' => preg_replace($regexp, '', $stringIdentifier)); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param MigrationStep[] $steps |
| 34 | 34 | * @param string $parsingError |
| 35 | 35 | */ |
| 36 | - function __construct($name, $path, $rawDefinition, $status = 0, array $steps=array(), $parsingError = null) |
|
| 36 | + function __construct($name, $path, $rawDefinition, $status = 0, array $steps = array(), $parsingError = null) |
|
| 37 | 37 | { |
| 38 | 38 | $this->name = $name; |
| 39 | 39 | $this->path = $path; |
@@ -15,9 +15,9 @@ discard block |
||
| 15 | 15 | * @param int $flags |
| 16 | 16 | * @param string $iterator_class |
| 17 | 17 | */ |
| 18 | - public function __construct ($input = array(), $flags = 0, $iterator_class = "ArrayIterator") |
|
| 18 | + public function __construct($input = array(), $flags = 0, $iterator_class = "ArrayIterator") |
|
| 19 | 19 | { |
| 20 | - foreach($input as $value) { |
|
| 20 | + foreach ($input as $value) { |
|
| 21 | 21 | if (!is_a($value, $this->allowedClass)) { |
| 22 | 22 | $this->throwInvalid($value); |
| 23 | 23 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * @param mixed $value |
| 29 | 29 | */ |
| 30 | - public function append ($value) |
|
| 30 | + public function append($value) |
|
| 31 | 31 | { |
| 32 | 32 | if (!is_a($value, $this->allowedClass)) { |
| 33 | 33 | $this->throwInvalid($value); |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | /** |
| 38 | 38 | * @param mixed $input |
| 39 | 39 | */ |
| 40 | - public function exchangeArray ($input) |
|
| 40 | + public function exchangeArray($input) |
|
| 41 | 41 | { |
| 42 | - foreach($input as $value) { |
|
| 42 | + foreach ($input as $value) { |
|
| 43 | 43 | if (!is_a($value, $this->allowedClass)) { |
| 44 | 44 | $this->throwInvalid($value); |
| 45 | 45 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param mixed $index |
| 51 | 51 | * @param mixed $newval |
| 52 | 52 | */ |
| 53 | - public function offsetSet ($index , $newval) |
|
| 53 | + public function offsetSet($index, $newval) |
|
| 54 | 54 | { |
| 55 | 55 | if (!is_a($newval, $this->allowedClass)) { |
| 56 | 56 | $this->throwInvalid($newval); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $configuration = new Configuration(); |
| 23 | 23 | $config = $this->processConfiguration($configuration, $configs); |
| 24 | 24 | |
| 25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 26 | 26 | $loader->load('services.yml'); |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -10,6 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | public function setUp() |
| 12 | 12 | { |
| 13 | - $this->connection = DriverManager::getConnection( array( 'driver' => 'pdo_sqlite', 'memory' => true ) ); |
|
| 13 | + $this->connection = DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'memory' => true)); |
|
| 14 | 14 | } |
| 15 | 15 | } |