@@ -221,6 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | /** |
| 223 | 223 | * Tries to generate forms if they don't exist yet and if we need write operations on entities. |
| 224 | + * @param string $entity |
|
| 224 | 225 | */ |
| 225 | 226 | protected function generateSerializationConfig($bundle, $entity, $metadata, $forceOverwrite) |
| 226 | 227 | { |
@@ -235,6 +236,7 @@ discard block |
||
| 235 | 236 | |
| 236 | 237 | /** |
| 237 | 238 | * Tries to generate forms if they don't exist yet and if we need write operations on entities. |
| 239 | + * @param string $entity |
|
| 238 | 240 | */ |
| 239 | 241 | protected function generateForm($bundle, $entity, $metadata, $forceOverwrite) |
| 240 | 242 | { |
@@ -247,6 +249,9 @@ discard block |
||
| 247 | 249 | return true; |
| 248 | 250 | } |
| 249 | 251 | |
| 252 | + /** |
|
| 253 | + * @param string $entity |
|
| 254 | + */ |
|
| 250 | 255 | protected function generateManager($bundle, $entity, $forceOverwrite) |
| 251 | 256 | { |
| 252 | 257 | try { |
@@ -258,6 +263,9 @@ discard block |
||
| 258 | 263 | return true; |
| 259 | 264 | } |
| 260 | 265 | |
| 266 | + /** |
|
| 267 | + * @param string $entity |
|
| 268 | + */ |
|
| 261 | 269 | protected function generateRepository($bundle, $entity, $forceOverwrite) |
| 262 | 270 | { |
| 263 | 271 | try { |
@@ -269,6 +277,9 @@ discard block |
||
| 269 | 277 | return true; |
| 270 | 278 | } |
| 271 | 279 | |
| 280 | + /** |
|
| 281 | + * @param string $entity |
|
| 282 | + */ |
|
| 272 | 283 | protected function updateRestRouting(QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output, BundleInterface $bundle, $entity, $metadata) |
| 273 | 284 | { |
| 274 | 285 | $output->write('Importing REST config: '); |
@@ -277,6 +288,10 @@ discard block |
||
| 277 | 288 | $config->addResource($bundle->getNamespace(), $entity, $metadata); |
| 278 | 289 | } |
| 279 | 290 | |
| 291 | + /** |
|
| 292 | + * @param string $format |
|
| 293 | + * @param string $entity |
|
| 294 | + */ |
|
| 280 | 295 | protected function updateRouting(QuestionHelper $questionHelper, InputInterface $input, OutputInterface $output, BundleInterface $bundle, $format, $entity, $prefix) |
| 281 | 296 | { |
| 282 | 297 | $auto = true; |
@@ -310,6 +325,9 @@ discard block |
||
| 310 | 325 | } |
| 311 | 326 | } |
| 312 | 327 | |
| 328 | + /** |
|
| 329 | + * @param string $entity |
|
| 330 | + */ |
|
| 313 | 331 | protected function getRoutePrefix(InputInterface $input, $entity) |
| 314 | 332 | { |
| 315 | 333 | $prefix = $input->getOption('route-prefix') ?: strtolower(str_replace(array('\\', '/'), '_', $entity)); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** |
| 25 | 25 | * @param BundleInterface $bundle |
| 26 | 26 | * |
| 27 | - * @return array |
|
| 27 | + * @return string[] |
|
| 28 | 28 | */ |
| 29 | 29 | protected function getSkeletonDirs(BundleInterface $bundle = null) |
| 30 | 30 | { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | /** |
| 58 | 58 | * @param $shortcut |
| 59 | 59 | * |
| 60 | - * @return array |
|
| 60 | + * @return string[] |
|
| 61 | 61 | */ |
| 62 | 62 | protected function parseShortcutNotation($shortcut) |
| 63 | 63 | { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
| 77 | - * @param $entity |
|
| 77 | + * @param string $entity |
|
| 78 | 78 | * |
| 79 | 79 | * @return array |
| 80 | 80 | */ |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | * @param Request $request |
| 250 | 250 | * @param int $id |
| 251 | 251 | * |
| 252 | - * @return FormInterface |
|
| 252 | + * @return Response |
|
| 253 | 253 | */ |
| 254 | 254 | protected function editForm(Request $request, $id) |
| 255 | 255 | { |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | * Apply serialization rules on response object. |
| 296 | 296 | * |
| 297 | 297 | * @param object $result |
| 298 | - * @param array $groups |
|
| 298 | + * @param string[] $groups |
|
| 299 | 299 | * @param int $statusCode |
| 300 | 300 | * |
| 301 | 301 | * @return Response |
@@ -11,6 +11,9 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | abstract class RequestAwareEventListener |
| 13 | 13 | { |
| 14 | + /** |
|
| 15 | + * @return string |
|
| 16 | + */ |
|
| 14 | 17 | protected function getControllerMethod(Request $request) |
| 15 | 18 | { |
| 16 | 19 | $controller = $request->attributes->get('_controller'); |
@@ -122,6 +122,9 @@ |
||
| 122 | 122 | )); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | + /** |
|
| 126 | + * @param boolean $forceOverwrite |
|
| 127 | + */ |
|
| 125 | 128 | protected function canWriteToFile($file, $forceOverwrite) |
| 126 | 129 | { |
| 127 | 130 | return !file_exists($file) || $forceOverwrite; |
@@ -18,6 +18,9 @@ |
||
| 18 | 18 | $this->helper = new BundleStructureHelper($bundle, $entity); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param boolean $forceOverwrite |
|
| 23 | + */ |
|
| 21 | 24 | protected function canWriteToFile($forceOverwrite) |
| 22 | 25 | { |
| 23 | 26 | return !file_exists($this->helper->getManagerFullFilename()) || $forceOverwrite; |
@@ -18,6 +18,9 @@ |
||
| 18 | 18 | $this->helper = new BundleStructureHelper($bundle, $entity); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | + /** |
|
| 22 | + * @param boolean $forceOverwrite |
|
| 23 | + */ |
|
| 21 | 24 | protected function canWriteToFile($forceOverwrite) |
| 22 | 25 | { |
| 23 | 26 | return !file_exists($this->helper->getRepositoryFullFilename()) || $forceOverwrite; |
@@ -73,11 +73,18 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string $file |
|
| 78 | + * @param boolean $forceOverwrite |
|
| 79 | + */ |
|
| 76 | 80 | protected function canWriteToFile($file, $forceOverwrite) |
| 77 | 81 | { |
| 78 | 82 | return !file_exists($file) || $forceOverwrite; |
| 79 | 83 | } |
| 80 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $filePath |
|
| 87 | + */ |
|
| 81 | 88 | protected function writeYamlToFile($filePath, array $data) |
| 82 | 89 | { |
| 83 | 90 | $yaml = Yaml::dump($data, 4); |
@@ -110,6 +117,9 @@ discard block |
||
| 110 | 117 | } |
| 111 | 118 | } |
| 112 | 119 | |
| 120 | + /** |
|
| 121 | + * @param string $filePath |
|
| 122 | + */ |
|
| 113 | 123 | protected function getYamlFileContent($filePath) |
| 114 | 124 | { |
| 115 | 125 | return file_exists($filePath) ? Yaml::parse($filePath) : []; |
@@ -119,7 +129,7 @@ discard block |
||
| 119 | 129 | * Returns an array of fields. Fields can be both column fields and |
| 120 | 130 | * association fields. |
| 121 | 131 | * |
| 122 | - * @param $entityName |
|
| 132 | + * @param string $entityName |
|
| 123 | 133 | * @param ClassMetadataInfo $metadata |
| 124 | 134 | * |
| 125 | 135 | * @return array $fields |
@@ -172,6 +182,9 @@ discard block |
||
| 172 | 182 | return $result; |
| 173 | 183 | } |
| 174 | 184 | |
| 185 | + /** |
|
| 186 | + * @param string $entityName |
|
| 187 | + */ |
|
| 175 | 188 | private function getRelationsFromMetadata($entityName) |
| 176 | 189 | { |
| 177 | 190 | $result = []; |
@@ -144,6 +144,9 @@ |
||
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | + /** |
|
| 148 | + * @param string $dataclass |
|
| 149 | + */ |
|
| 147 | 150 | protected function getAutocompleteUrl($dataclass) |
| 148 | 151 | { |
| 149 | 152 | $entityName = $dataclass; |