@@ -106,7 +106,7 @@ |
||
106 | 106 | * Return action configuration resolver |
107 | 107 | * |
108 | 108 | * @param OptionsResolver $resolver |
109 | - * @param $actionName |
|
109 | + * @param string $actionName |
|
110 | 110 | * @param Admin|null $admin |
111 | 111 | */ |
112 | 112 | protected function configureOptionsResolver(OptionsResolver $resolver, $actionName, Admin $admin = null) |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | Admin::LOAD_STRATEGY_UNIQUE, |
158 | 158 | Admin::LOAD_STRATEGY_MULTIPLE, |
159 | 159 | ]) |
160 | - ->setNormalizer('route', function (Options $options, $value) use ($admin, $actionName) { |
|
160 | + ->setNormalizer('route', function(Options $options, $value) use ($admin, $actionName) { |
|
161 | 161 | if (!$value) { |
162 | 162 | // if no route was provided, it should be linked to an Admin |
163 | 163 | if (!$admin) { |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | return $value; |
170 | 170 | }) |
171 | - ->setNormalizer('title', function (Options $options, $value) use ($admin, $actionName) { |
|
171 | + ->setNormalizer('title', function(Options $options, $value) use ($admin, $actionName) { |
|
172 | 172 | if (!$value) { |
173 | 173 | $adminKey = ''; |
174 | 174 | // if an Admin is linked to this action, we use its name in translation key |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | } |
180 | 180 | return $value; |
181 | 181 | }) |
182 | - ->setNormalizer('batch', function (Options $options, $value) use ($admin, $actionName) { |
|
182 | + ->setNormalizer('batch', function(Options $options, $value) use ($admin, $actionName) { |
|
183 | 183 | if ($value) { |
184 | 184 | if (!is_array($value)) { |
185 | 185 | $value = [$value]; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * Find an entity by its unique id |
53 | 53 | * |
54 | - * @param $id |
|
54 | + * @param string $id |
|
55 | 55 | * @return object |
56 | 56 | */ |
57 | 57 | public function find($id) |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Save an entity |
66 | 66 | * |
67 | - * @param $entity |
|
67 | + * @param \stdClass $entity |
|
68 | 68 | */ |
69 | 69 | public function save($entity) |
70 | 70 | { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | /** |
77 | 77 | * Remove an entity |
78 | 78 | * |
79 | - * @param $entity |
|
79 | + * @param \stdClass $entity |
|
80 | 80 | */ |
81 | 81 | public function remove($entity) |
82 | 82 | { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | /** |
44 | 44 | * ExtraConfigurationSubscriber constructor |
45 | 45 | * |
46 | - * @param bool|true $enableExtraConfiguration |
|
46 | + * @param boolean $enableExtraConfiguration |
|
47 | 47 | * @param EntityManager $entityManager |
48 | 48 | * @param ApplicationConfiguration $applicationConfiguration |
49 | 49 | */ |
@@ -20,6 +20,9 @@ |
||
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $adminName |
|
25 | + */ |
|
23 | 26 | protected function doTestAdmin(AdminInterface $admin, array $configuration, $adminName) |
24 | 27 | { |
25 | 28 | $this->assertEquals($admin->getName(), $adminName); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
56 | - * @return array |
|
56 | + * @return Twig_SimpleFunction[] |
|
57 | 57 | */ |
58 | 58 | public function getFunctions() |
59 | 59 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | - * @return array |
|
70 | + * @return Twig_SimpleFilter[] |
|
71 | 71 | */ |
72 | 72 | public function getFilters() |
73 | 73 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace LAG\AdminBundle\Twig; |
4 | 4 | |
5 | 5 | use LAG\AdminBundle\Admin\Configuration\ApplicationConfiguration; |
6 | -use LAG\AdminBundle\Field\Field; |
|
7 | 6 | use LAG\AdminBundle\Field\EntityFieldInterface; |
8 | 7 | use LAG\AdminBundle\Field\FieldInterface; |
9 | 8 | use Symfony\Component\DependencyInjection\Container; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | 'url_pattern', |
147 | 147 | 'name_pattern', |
148 | 148 | ]); |
149 | - $resolver->setNormalizer('url_pattern', function (Options $options, $value) { |
|
149 | + $resolver->setNormalizer('url_pattern', function(Options $options, $value) { |
|
150 | 150 | if (strstr($value, '{admin}') === false) { |
151 | 151 | throw new InvalidOptionsException('Admin routing configuration url pattern should contains {admin} placeholder'); |
152 | 152 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | return $value; |
158 | 158 | }); |
159 | - $resolver->setNormalizer('name_pattern', function (Options $options, $value) { |
|
159 | + $resolver->setNormalizer('name_pattern', function(Options $options, $value) { |
|
160 | 160 | if (strstr($value, '{admin}') === false) { |
161 | 161 | throw new InvalidOptionsException('Admin routing configuration pattern name should contains {admin} placeholder'); |
162 | 162 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | ->clear() |
175 | 175 | ->setDefault('enabled', true) |
176 | 176 | ->setDefault('pattern', 'lag.admin.{key}'); |
177 | - $resolver->setNormalizer('pattern', function (Options $options, $value) { |
|
177 | + $resolver->setNormalizer('pattern', function(Options $options, $value) { |
|
178 | 178 | if (strstr($value, 'key') === false) { |
179 | 179 | throw new InvalidOptionsException('Admin translation configuration pattern should contains {key} placeholder'); |
180 | 180 | } |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * ApplicationConfiguration constructor. |
119 | 119 | * |
120 | 120 | * @param array $applicationConfiguration |
121 | - * @param $locale |
|
121 | + * @param string $locale |
|
122 | 122 | */ |
123 | 123 | public function __construct(array $applicationConfiguration = [], $locale) |
124 | 124 | { |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
226 | - * @return mixed |
|
226 | + * @return string |
|
227 | 227 | */ |
228 | 228 | public function getTitle() |
229 | 229 | { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
242 | - * @return mixed |
|
242 | + * @return string |
|
243 | 243 | */ |
244 | 244 | public function getLayout() |
245 | 245 | { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
258 | - * @return mixed |
|
258 | + * @return string |
|
259 | 259 | */ |
260 | 260 | public function getBlockTemplate() |
261 | 261 | { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
274 | - * @return mixed |
|
274 | + * @return string |
|
275 | 275 | */ |
276 | 276 | public function getDescription() |
277 | 277 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
306 | - * @return mixed |
|
306 | + * @return string |
|
307 | 307 | */ |
308 | 308 | public function getDateFormat() |
309 | 309 | { |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | } |
398 | 398 | |
399 | 399 | /** |
400 | - * @return mixed |
|
400 | + * @return integer |
|
401 | 401 | */ |
402 | 402 | public function getStringLengthTruncate() |
403 | 403 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | // foreach tagged, with add this field type to the field factory |
26 | 26 | foreach ($taggedServices as $id => $tags) { |
27 | 27 | if (empty($tags[0]['type'])) { |
28 | - throw new InvalidConfigurationException('You should defined a "type" attribute for field tag for service '.$id); |
|
28 | + throw new InvalidConfigurationException('You should defined a "type" attribute for field tag for service ' . $id); |
|
29 | 29 | } |
30 | 30 | // add allowed field type to the field factory |
31 | 31 | $definition->addMethodCall('addFieldMapping', [ |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $configuration = new Configuration(); |
23 | 23 | $config = $this->processConfiguration($configuration, $configs); |
24 | 24 | |
25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
26 | 26 | $loader->load('services.yml'); |
27 | 27 | |
28 | 28 | $container->setParameter('bluebear.admins', $config['admins']); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | } |
35 | 35 | // check if they exists in entities displayed and if checkbox is checked |
36 | 36 | foreach ($batchItems as $name => $batchItem) { |
37 | - $batchId = (int)str_replace('batch_', '', $name); |
|
37 | + $batchId = (int) str_replace('batch_', '', $name); |
|
38 | 38 | |
39 | 39 | if (array_key_exists($batchId, $cleanData['labels']) && $batchItem === true) { |
40 | 40 | $cleanData['ids'][] = $batchId; |