Completed
Pull Request — master (#21)
by Pavel
22:01
created
Exception/EntityProcessingException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         }
35 35
 
36 36
         return new static(
37
-            'Invalid data submitted for entity: ' . PHP_EOL .
37
+            'Invalid data submitted for entity: '.PHP_EOL.
38 38
             Yaml::dump($errors)
39 39
         );
40 40
     }
Please login to merge, or discard this patch.
DependencyInjection/CrudsEntitiesConfigurator.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@
 block discarded – undo
344 344
      * @param string $actionName
345 345
      * @param string $path
346 346
      * @param string $action
347
-     * @param array $methods
347
+     * @param string[] $methods
348 348
      * @param array $options
349 349
      *
350 350
      * @return Definition
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 use ScayTrase\Api\Cruds\Controller\SearchController;
12 12
 use ScayTrase\Api\Cruds\Controller\UpdateController;
13 13
 use ScayTrase\Api\Cruds\Criteria\NestedCriteriaConfigurator;
14
-use ScayTrase\Api\Cruds\ReflectionConstructorFactory;
15 14
 use Symfony\Component\DependencyInjection\ChildDefinition;
16 15
 use Symfony\Component\DependencyInjection\DefinitionDecorator;
17 16
 use Symfony\Component\DependencyInjection\ContainerBuilder;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $mount = $config['mount'];
44 44
 
45 45
         if (null === $manager) {
46
-            $manager = 'cruds.class_' . $class . '.object_manager';
46
+            $manager = 'cruds.class_'.$class.'.object_manager';
47 47
             $managerDef = new Definition(ObjectManager::class);
48 48
             $managerDef->setPublic(false);
49 49
             $managerDef->setFactory([new Reference('doctrine'), 'getManagerForClass']);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $manager = new Reference($this->filterReference($manager));
54 54
 
55 55
         if (null === $repository) {
56
-            $repository = 'cruds.class_' . $class . '.entity_repository';
56
+            $repository = 'cruds.class_'.$class.'.entity_repository';
57 57
             $repositoryDef = new Definition(EntityRepository::class);
58 58
             $repositoryDef->setPublic(false);
59 59
             $repositoryDef->setFactory([$manager, 'getRepository']);
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
             $actionConfig['class'] = $class;
73 73
             $actionConfig['mount'] = $mount;
74 74
             $actionConfig['repository'] = $repository;
75
-            $actionConfig['path'] = $prefix . $actionConfig['path'];
75
+            $actionConfig['path'] = $prefix.$actionConfig['path'];
76 76
             $actionConfig['manager'] = $manager;
77 77
             $actionConfig['prefix'] = $prefix;
78
-            $function = new \ReflectionMethod($this, 'register' . ucfirst($action) . 'Action');
78
+            $function = new \ReflectionMethod($this, 'register'.ucfirst($action).'Action');
79 79
             $args = [];
80 80
 
81 81
             foreach ($function->getParameters() as $parameter) {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $controllerId = $this->generateControllerId($name, $actionName);
96 96
 
97 97
         if (null === $factory) {
98
-            $factory = $controllerId . '.entity_factory';
98
+            $factory = $controllerId.'.entity_factory';
99 99
 
100 100
             if (class_exists(ChildDefinition::class)) {
101 101
                 $factoryDef = new ChildDefinition('cruds.factory.reflection');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         $this->container->setDefinition($controllerId, $definition);
133 133
 
134
-        $action = $controllerId . ':' . CreateController::ACTION;
134
+        $action = $controllerId.':'.CreateController::ACTION;
135 135
         $this->registerRoute(
136 136
             $mount,
137 137
             $name,
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         $controllerId = $this->generateControllerId($name, $actionName);
159 159
         $this->container->setDefinition($controllerId, $definition);
160 160
 
161
-        $action = $controllerId . ':' . ReadController::ACTION;
161
+        $action = $controllerId.':'.ReadController::ACTION;
162 162
         $this->registerRoute(
163 163
             $mount,
164 164
             $name,
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         $controllerId = $this->generateControllerId($name, $actionName);
194 194
         $this->container->setDefinition($controllerId, $definition);
195 195
 
196
-        $action = $controllerId . ':' . UpdateController::ACTION;
196
+        $action = $controllerId.':'.UpdateController::ACTION;
197 197
         $this->registerRoute(
198 198
             $mount,
199 199
             $name,
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         $controllerId = $controllerId = $this->generateControllerId($name, $actionName);
223 223
         $this->container->setDefinition($controllerId, $definition);
224 224
 
225
-        $action = $controllerId . ':' . DeleteController::ACTION;
225
+        $action = $controllerId.':'.DeleteController::ACTION;
226 226
         $definition->setPublic(true);
227 227
         $this->registerRoute(
228 228
             $mount,
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $controllerId = $this->generateControllerId($name, $actionName);
273 273
         $this->container->setDefinition($controllerId, $definition);
274 274
 
275
-        $action = $controllerId . ':' . SearchController::ACTION;
275
+        $action = $controllerId.':'.SearchController::ACTION;
276 276
         $this->registerRoute(
277 277
             $mount,
278 278
             $name,
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
         $controllerId = $this->generateControllerId($name, $actionName);
299 299
         $this->container->setDefinition($controllerId, $definition);
300 300
 
301
-        $action = $controllerId . ':' . CountController::ACTION;
301
+        $action = $controllerId.':'.CountController::ACTION;
302 302
         $this->registerRoute(
303 303
             $mount,
304 304
             $name,
305 305
             $actionName,
306
-            $prefix . $count_path,
306
+            $prefix.$count_path,
307 307
             $action,
308 308
             ['GET', 'POST'],
309 309
             ['class' => $class, 'arguments' => ['criteria']]
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
     private function generateControllerId(string $name, string $actionName): string
327 327
     {
328
-        return $this->normalize('cruds.generated_controller.' . $name . '.' . $actionName);
328
+        return $this->normalize('cruds.generated_controller.'.$name.'.'.$actionName);
329 329
     }
330 330
 
331 331
     /**
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
             'addRoute',
364 364
             [
365 365
                 $mount,
366
-                $this->normalize('cruds.routing.' . $name . '.' . $actionName),
366
+                $this->normalize('cruds.routing.'.$name.'.'.$actionName),
367 367
                 $path,
368 368
                 $action,
369 369
                 $methods,
Please login to merge, or discard this patch.
Tests/Unit/Processor/FormProcessorTest.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,6 @@
 block discarded – undo
7 7
 use ScayTrase\Api\Cruds\Exception\EntityProcessingException;
8 8
 use ScayTrase\Api\Cruds\PublicPropertyMapper;
9 9
 use ScayTrase\Api\Cruds\Tests\WebTestCase;
10
-use ScayTrase\Api\Cruds\Tests\Fixtures\SymfonySerializer\SymfonyTestKernel;
11
-use ScayTrase\Api\Cruds\Tests\StaticKernelTestTrait;
12 10
 use Symfony\Component\Form\AbstractType;
13 11
 use Symfony\Component\Form\Extension\Core\Type\CollectionType;
14 12
 use Symfony\Component\Form\Extension\Core\Type\IntegerType;
Please login to merge, or discard this patch.
Tests/Fixtures/Common/CrudsTestKernel.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function getLogDir()
29 29
     {
30
-        return __DIR__ . '/../../../build/' . $this->getClassName() . '/logs';
30
+        return __DIR__.'/../../../build/'.$this->getClassName().'/logs';
31 31
     }
32 32
 
33 33
     /**
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
     /** {@inheritdoc} */
44 44
     public function registerContainerConfiguration(LoaderInterface $loader)
45 45
     {
46
-        return $loader->load(__DIR__ . '/config.yml');
46
+        return $loader->load(__DIR__.'/config.yml');
47 47
     }
48 48
 
49 49
     protected function initializeContainer()
50 50
     {
51 51
         $class = $this->getContainerClass();
52
-        $cache = new ConfigCache($this->getCacheDir() . '/' . $class . '.php', $this->debug);
52
+        $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug);
53 53
 
54 54
         $container = $this->buildContainer();
55 55
         $container->compile();
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function getCacheDir()
62 62
     {
63
-        return __DIR__ . '/../../../build/' . $this->getClassName() . '/cache';
63
+        return __DIR__.'/../../../build/'.$this->getClassName().'/cache';
64 64
     }
65 65
 
66 66
     /** {@inheritdoc} */
67 67
     protected function buildContainer()
68 68
     {
69 69
         $container = parent::buildContainer();
70
-        $container->addResource(new FileResource(__DIR__ . '/config.yml'));
71
-        $container->addResource(new FileResource(__DIR__ . '/routing.yml'));
70
+        $container->addResource(new FileResource(__DIR__.'/config.yml'));
71
+        $container->addResource(new FileResource(__DIR__.'/routing.yml'));
72 72
 
73 73
         return $container;
74 74
     }
Please login to merge, or discard this patch.