Completed
Pull Request — master (#4)
by
unknown
17:45
created
Command/GenerateCrudCommand.php 1 patch
Doc Comments   +18 added lines patch added patch discarded remove patch
@@ -221,6 +221,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
Command/GeneratorCommand.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
74 74
     }
75 75
 
76 76
     /**
77
-     * @param $entity
77
+     * @param string $entity
78 78
      *
79 79
      * @return array
80 80
      */
Please login to merge, or discard this patch.
Controller/RestController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
EventListener/RequestAwareEventListener.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
Generator/DoctrineRepositoryGenerator.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Generator/DoctrineSerializationConfigGenerator.php 2 patches
Doc Comments   +14 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,11 +73,18 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 = [];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function generate(ClassMetadataInfo $metadata, $forceOverwrite = false)
43 43
     {
44
-        $file = $this->helper->getResourcesDirname() . '/config/serializer/Entity.' . $this->helper->getEntityClass() . '.yml';
44
+        $file = $this->helper->getResourcesDirname().'/config/serializer/Entity.'.$this->helper->getEntityClass().'.yml';
45 45
 
46 46
         if (!file_exists(dirname($file)) && !@mkdir(dirname($file), 0777, true)) {
47 47
             throw new IOException('Unable to create config/serializer directory');
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $targetClassName = basename($targetClass);
95 95
 
96
-        $targetPath = $dirPath . '/Entity.' . $targetClassName . '.yml';
96
+        $targetPath = $dirPath.'/Entity.'.$targetClassName.'.yml';
97 97
         $targetData = $this->getYamlFileContent($targetPath);
98 98
 
99 99
         if (isset($targetData[$targetClass])) {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
         $groups = [];
180 180
         foreach ($this->excludedRelationPrefixSuffixPairs as $pair) {
181
-            $groups[] = $pair[0] . $entityName . $pair[1];
181
+            $groups[] = $pair[0].$entityName.$pair[1];
182 182
         }
183 183
 
184 184
         $result[] = [
Please login to merge, or discard this patch.
Handler/FormlyFormHandler.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -144,6 +144,9 @@
 block discarded – undo
144 144
         }
145 145
     }
146 146
 
147
+    /**
148
+     * @param string $dataclass
149
+     */
147 150
     protected function getAutocompleteUrl($dataclass)
148 151
     {
149 152
         $entityName = $dataclass;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
     {
149 149
         $entityName = $dataclass;
150 150
 
151
-        $routeName = 'autocomplete_' . strtolower($entityName);
151
+        $routeName = 'autocomplete_'.strtolower($entityName);
152 152
 
153 153
         return $this->router->getRouteCollection()->get($routeName) ? $this->router->generate($routeName) : null;
154 154
     }
Please login to merge, or discard this patch.
Model/RestPaginator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
     }
119 119
 
120 120
     /**
121
-     * @return array
121
+     * @return integer
122 122
      */
123 123
     public function getItems()
124 124
     {
Please login to merge, or discard this patch.
Service/RestPaginatorFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             $page = $paramFetcher->get('page');
51 51
             $limit = $paramFetcher->get('limit');
52 52
             /** @var AbstractPagination $paginationView */
53
-            $paginationView =  $this->paginator->paginate($query, $page, $limit);
53
+            $paginationView = $this->paginator->paginate($query, $page, $limit);
54 54
 
55 55
             return new RestPaginator(
56 56
                 $page,
Please login to merge, or discard this patch.