@@ -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 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | ->defaultValue('api') |
54 | 54 | ->cannotBeEmpty() |
55 | 55 | ->info( |
56 | - 'Route mount. You can create different entries ' . |
|
56 | + 'Route mount. You can create different entries '. |
|
57 | 57 | 'with different mounts. You can use this value when loading routes' |
58 | 58 | ) |
59 | 59 | ->example('my-mount-name'); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ->beforeNormalization() |
74 | 74 | ->ifArray() |
75 | 75 | ->then( |
76 | - function (array $v) { |
|
76 | + function(array $v) { |
|
77 | 77 | if (array_keys($v) !== range(0, count($v) - 1)) { |
78 | 78 | return $v; |
79 | 79 | } |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | ->defaultNull() |
109 | 109 | ->example('@my_entity.factory') |
110 | 110 | ->info( |
111 | - 'Service ID implementing ' . PHP_EOL . |
|
112 | - EntityFactoryInterface::class . PHP_EOL . |
|
113 | - 'Defaults to ' . ReflectionConstructorFactory::class |
|
111 | + 'Service ID implementing '.PHP_EOL. |
|
112 | + EntityFactoryInterface::class.PHP_EOL. |
|
113 | + 'Defaults to '.ReflectionConstructorFactory::class |
|
114 | 114 | ); |
115 | 115 | |
116 | 116 | $create |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | ->defaultNull() |
120 | 120 | ->example('@my_entity.factory') |
121 | 121 | ->info( |
122 | - 'Service ID implementing ' . PHP_EOL . |
|
123 | - EntityFactoryInterface::class . PHP_EOL . |
|
124 | - 'Defaults to ' . ReflectionConstructorFactory::class |
|
122 | + 'Service ID implementing '.PHP_EOL. |
|
123 | + EntityFactoryInterface::class.PHP_EOL. |
|
124 | + 'Defaults to '.ReflectionConstructorFactory::class |
|
125 | 125 | ); |
126 | 126 | |
127 | 127 | $this->configureActionNode($create, 'create'); |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | ->defaultNull() |
162 | 162 | ->example('@my_entity.processor') |
163 | 163 | ->info( |
164 | - 'Service ID implementing ' . PHP_EOL . |
|
165 | - EntityProcessorInterface::class . PHP_EOL . |
|
166 | - 'Defaults to ' . PropertyAccessProcessor::class |
|
164 | + 'Service ID implementing '.PHP_EOL. |
|
165 | + EntityProcessorInterface::class.PHP_EOL. |
|
166 | + 'Defaults to '.PropertyAccessProcessor::class |
|
167 | 167 | ); |
168 | 168 | |
169 | 169 | $this->configureActionNode($update, 'update'); |
@@ -185,6 +185,6 @@ discard block |
||
185 | 185 | ->children() |
186 | 186 | ->scalarNode('path') |
187 | 187 | ->info('Action path (will be prefixed with entity prefix)') |
188 | - ->defaultValue('/' . $action); |
|
188 | + ->defaultValue('/'.$action); |
|
189 | 189 | } |
190 | 190 | } |