Completed
Pull Request — master (#15)
by Pavel
19:37
created
Tests/AbstractCrudsWebTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             implode(
37 37
                 "\n\n",
38 38
                 array_map(
39
-                    function ($l) {
39
+                    function($l) {
40 40
                         return implode("\n\n", $l);
41 41
                     },
42 42
                     $errors
Please login to merge, or discard this patch.
DependencyInjection/Compiler/DoctrineOrmCompilerPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             return;
22 22
         }
23 23
 
24
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../../Resources/config'));
24
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../../Resources/config'));
25 25
         $loader->load('doctrine.yml');
26 26
 
27 27
         $factory = $container->getDefinition('cruds.factory.reflection');
Please login to merge, or discard this patch.
Adaptors/JmsSerializer/JmsValidatorSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             throw new EntityProcessingException(
41 41
                 'Data for the entity is not valid',
42 42
                 array_map(
43
-                    function (ConstraintViolationInterface $violation) {
43
+                    function(ConstraintViolationInterface $violation) {
44 44
                         return $violation->getMessage();
45 45
                     },
46 46
                     iterator_to_array($list)
Please login to merge, or discard this patch.
Adaptors/Symfony/MappedEntityFormFactory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     }
29 29
 
30 30
     /**
31
-     * @param $className
31
+     * @param string $className
32 32
      *
33 33
      * @return FormInterface
34 34
      *
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace ScayTrase\Api\Cruds\Adaptors\Symfony;
4 4
 
5 5
 use ScayTrase\Api\Cruds\Exception\EntityProcessingException;
6
-use ScayTrase\Api\Cruds\Exception\MapperException;
7 6
 use ScayTrase\Api\Cruds\PropertyMapperInterface;
8 7
 use Symfony\Component\Form\FormFactoryInterface;
9 8
 use Symfony\Component\Form\FormInterface;
Please login to merge, or discard this patch.
DependencyInjection/CrudsEntitiesConfigurator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@
 block discarded – undo
227 227
      * @param string $actionName
228 228
      * @param string $path
229 229
      * @param string $action
230
-     * @param array  $methods
230
+     * @param string[]  $methods
231 231
      * @param array  $options
232 232
      *
233 233
      * @return Definition
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
             $actionConfig['class']      = $class;
66 66
             $actionConfig['mount']      = $mount;
67 67
             $actionConfig['repository'] = $repositoryDefinition;
68
-            $actionConfig['path']       = $prefix . $actionConfig['path'];
68
+            $actionConfig['path']       = $prefix.$actionConfig['path'];
69 69
             $actionConfig['manager']    = $manager;
70 70
             $actionConfig['prefix']     = $prefix;
71
-            $function                   = new \ReflectionMethod($this, 'register' . ucfirst($action) . 'Action');
71
+            $function                   = new \ReflectionMethod($this, 'register'.ucfirst($action).'Action');
72 72
             $args                       = [];
73 73
 
74 74
             foreach ($function->getParameters() as $parameter) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $controllerId = $this->generateControllerId($name, $actionName);
123 123
         $this->container->setDefinition($controllerId, $definition);
124 124
 
125
-        $action = $controllerId . ':' . CreateController::ACTION;
125
+        $action = $controllerId.':'.CreateController::ACTION;
126 126
         $this->registerRoute(
127 127
             $mount,
128 128
             $name,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     private function generateControllerId($name, $actionName)
152 152
     {
153
-        return $this->normalize('cruds.generated_controller.' . $name . '.' . $actionName);
153
+        return $this->normalize('cruds.generated_controller.'.$name.'.'.$actionName);
154 154
     }
155 155
 
156 156
     /**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             'addRoute',
182 182
             [
183 183
                 $mount,
184
-                $this->normalize('cruds.routing.' . $name . '.' . $actionName),
184
+                $this->normalize('cruds.routing.'.$name.'.'.$actionName),
185 185
                 $path,
186 186
                 $action,
187 187
                 $methods,
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $controllerId = $this->generateControllerId($name, $actionName);
216 216
         $this->container->setDefinition($controllerId, $definition);
217 217
 
218
-        $action = $controllerId . ':' . ReadController::ACTION;
218
+        $action = $controllerId.':'.ReadController::ACTION;
219 219
         $this->registerRoute(
220 220
             $mount,
221 221
             $name,
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $controllerId = $this->generateControllerId($name, $actionName);
250 250
         $this->container->setDefinition($controllerId, $definition);
251 251
 
252
-        $action = $controllerId . ':' . UpdateController::ACTION;
252
+        $action = $controllerId.':'.UpdateController::ACTION;
253 253
         $this->registerRoute(
254 254
             $mount,
255 255
             $name,
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $controllerId = $controllerId = $this->generateControllerId($name, $actionName);
277 277
         $this->container->setDefinition($controllerId, $definition);
278 278
 
279
-        $action = $controllerId . ':' . DeleteController::ACTION;
279
+        $action = $controllerId.':'.DeleteController::ACTION;
280 280
         $this->registerRoute(
281 281
             $mount,
282 282
             $name,
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         $controllerId = $this->generateControllerId($name, $actionName);
317 317
         $this->container->setDefinition($controllerId, $definition);
318 318
 
319
-        $action = $controllerId . ':' . SearchController::ACTION;
319
+        $action = $controllerId.':'.SearchController::ACTION;
320 320
         $this->registerRoute(
321 321
             $mount,
322 322
             $name,
@@ -341,12 +341,12 @@  discard block
 block discarded – undo
341 341
         $controllerId = $this->generateControllerId($name, $actionName);
342 342
         $this->container->setDefinition($controllerId, $definition);
343 343
 
344
-        $action = $controllerId . ':' . CountController::ACTION;
344
+        $action = $controllerId.':'.CountController::ACTION;
345 345
         $this->registerRoute(
346 346
             $mount,
347 347
             $name,
348 348
             $actionName,
349
-            $prefix . $count_path,
349
+            $prefix.$count_path,
350 350
             $action,
351 351
             ['GET', 'POST'],
352 352
             ['class' => $class, 'arguments' => ['criteria']]
Please login to merge, or discard this patch.
Routing/EntityRouteLoader.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     }
72 72
 
73 73
     /**
74
-     * @return string[]
74
+     * @return integer[]
75 75
      */
76 76
     public function getMounts()
77 77
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace ScayTrase\Api\Cruds\Routing;
4 4
 
5 5
 use Symfony\Component\Config\Loader\Loader;
6
-use Symfony\Component\Routing\Route;
7 6
 use Symfony\Component\Routing\RouteCollection;
8 7
 
9 8
 class EntityRouteLoader extends Loader
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      */
64 64
     public function getRoutes($mount)
65 65
     {
66
-        if (!array_key_exists($mount, $this->routes)){
66
+        if (!array_key_exists($mount, $this->routes)) {
67 67
             throw new \OutOfBoundsException('Mount does not exist');
68 68
         }
69 69
 
Please login to merge, or discard this patch.
Tests/Fixtures/Common/CrudsTestKernel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,26 +24,26 @@
 block discarded – undo
24 24
 
25 25
     public function getCacheDir()
26 26
     {
27
-        return __DIR__ . '/../../../build/' . $this->getClassName() . '/cache';
27
+        return __DIR__.'/../../../build/'.$this->getClassName().'/cache';
28 28
     }
29 29
 
30 30
     public function getLogDir()
31 31
     {
32
-        return __DIR__ . '/../../../build/' . $this->getClassName() . '/logs';
32
+        return __DIR__.'/../../../build/'.$this->getClassName().'/logs';
33 33
     }
34 34
 
35 35
     /** {@inheritdoc} */
36 36
     public function registerContainerConfiguration(LoaderInterface $loader)
37 37
     {
38
-        return $loader->load(__DIR__ . '/config.yml');
38
+        return $loader->load(__DIR__.'/config.yml');
39 39
     }
40 40
 
41 41
     /** {@inheritdoc} */
42 42
     protected function buildContainer()
43 43
     {
44 44
         $container = parent::buildContainer();
45
-        $container->addResource(new FileResource(__DIR__ . '/config.yml'));
46
-        $container->addResource(new FileResource(__DIR__ . '/routing.yml'));
45
+        $container->addResource(new FileResource(__DIR__.'/config.yml'));
46
+        $container->addResource(new FileResource(__DIR__.'/routing.yml'));
47 47
 
48 48
         return $container;
49 49
     }
Please login to merge, or discard this patch.
reference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use ScayTrase\Api\Cruds\DependencyInjection\Configuration;
4 4
 use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
5 5
 
6
-require_once __DIR__ . '/bootstrap.php';
6
+require_once __DIR__.'/bootstrap.php';
7 7
 
8 8
 $config = new Configuration();
9 9
 $dumper = new YamlReferenceDumper();
Please login to merge, or discard this patch.
DependencyInjection/CrudsExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     /** {@inheritdoc} */
13 13
     public function load(array $configs, ContainerBuilder $container)
14 14
     {
15
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
15
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
16 16
         $loader->load('cruds.yml');
17 17
 
18 18
         $config = $this->processConfiguration($this->getConfiguration([], $container), $configs);
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $configurator = new CrudsEntitiesConfigurator($container);
21 21
         $container->addObjectResource($configurator);
22 22
         foreach ($config['entities'] as $name => $entityConfig) {
23
-            $entityConfig['prefix'] = $entityConfig['prefix'] ?: '/' . $name;
23
+            $entityConfig['prefix'] = $entityConfig['prefix'] ?: '/'.$name;
24 24
             $configurator->processEntityConfiguration($name, $entityConfig);
25 25
         }
26 26
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 continue;
30 30
             }
31 31
 
32
-            $container->removeDefinition('cruds.api.listener.' . $listener);
32
+            $container->removeDefinition('cruds.api.listener.'.$listener);
33 33
         }
34 34
     }
35 35
 }
Please login to merge, or discard this patch.