@@ -36,7 +36,7 @@ |
||
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 |
@@ -21,7 +21,7 @@ |
||
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'); |
@@ -40,7 +40,7 @@ |
||
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) |
@@ -28,7 +28,7 @@ |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
31 | - * @param $className |
|
31 | + * @param string $className |
|
32 | 32 | * |
33 | 33 | * @return FormInterface |
34 | 34 | * |
@@ -3,7 +3,6 @@ |
||
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; |
@@ -227,7 +227,7 @@ |
||
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 |
@@ -71,7 +71,7 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
74 | - * @return string[] |
|
74 | + * @return integer[] |
|
75 | 75 | */ |
76 | 76 | public function getMounts() |
77 | 77 | { |
@@ -3,7 +3,6 @@ |
||
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 |
@@ -63,7 +63,7 @@ |
||
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 |
@@ -24,26 +24,26 @@ |
||
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 | } |
@@ -3,7 +3,7 @@ |
||
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(); |
@@ -12,7 +12,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |