@@ -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 | { |
@@ -393,8 +393,7 @@ |
||
| 393 | 393 | $ret[$key] = $this->referenceResolver->getReferenceValue($val); |
| 394 | 394 | } |
| 395 | 395 | } |
| 396 | - } |
|
| 397 | - else { |
|
| 396 | + } else { |
|
| 398 | 397 | $ret = $value; |
| 399 | 398 | |
| 400 | 399 | if ($this->referenceResolver->isReference($value)) { |
@@ -85,8 +85,7 @@ |
||
| 85 | 85 | ); |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | - } |
|
| 89 | - else { |
|
| 88 | + } else { |
|
| 90 | 89 | throw new \Exception("Path '$path' is neither a file nor directory"); |
| 91 | 90 | } |
| 92 | 91 | } |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | { |
| 33 | 33 | $fieldService = $this->fieldTypeMap[$fieldTypeIdentifier]; |
| 34 | 34 | return $fieldService->createValue($fieldValueArray, $context); |
| 35 | - } |
|
| 36 | - else |
|
| 35 | + } else |
|
| 37 | 36 | { |
| 38 | 37 | throw new \InvalidArgumentException("Field of type '$fieldTypeIdentifier' can not be handled as it does not have a complex field class defined"); |
| 39 | 38 | } |
@@ -94,7 +94,6 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * @param Migration $migration |
|
| 98 | 97 | */ |
| 99 | 98 | public function addMigration(MigrationDefinition $migrationDefinition) |
| 100 | 99 | { |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | /** |
| 99 | 99 | * Creates and stores a new migration (leaving it in TODO status) |
| 100 | 100 | * @param MigrationDefinition $migrationDefinition |
| 101 | - * @return mixed |
|
| 101 | + * @return Migration |
|
| 102 | 102 | * @throws \Exception If the migration exists already (we rely on the PK for that) |
| 103 | 103 | */ |
| 104 | 104 | public function addMigration(MigrationDefinition $migrationDefinition) |
@@ -48,6 +48,9 @@ discard block |
||
| 48 | 48 | $this->checkGeneratedFile($this->saveGeneratedFile($output)); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | + /** |
|
| 52 | + * @param null|string $output |
|
| 53 | + */ |
|
| 51 | 54 | protected function saveGeneratedFile($output) |
| 52 | 55 | { |
| 53 | 56 | var_dump($output); |
@@ -59,6 +62,9 @@ discard block |
||
| 59 | 62 | return null; |
| 60 | 63 | } |
| 61 | 64 | |
| 65 | + /** |
|
| 66 | + * @param string|null $filePath |
|
| 67 | + */ |
|
| 62 | 68 | protected function checkGeneratedFile($filePath) |
| 63 | 69 | { |
| 64 | 70 | $input = new ArrayInput(array('command' => 'kaliop:migration:status')); |