Completed
Branch dev (a083dd)
by Arnaud
03:08
created
Tests/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@  discard block
 block discarded – undo
4 4
 
5 5
 //use Symfony\Component\HttpFoundation\Request;
6 6
 
7
-if (!is_file($loaderFile = __DIR__.'/../vendor/autoload.php') && !is_file($loaderFile = __DIR__.'/../../../../../../vendor/autoload.php')) {
7
+if (!is_file($loaderFile = __DIR__ . '/../vendor/autoload.php') && !is_file($loaderFile = __DIR__ . '/../../../../../../vendor/autoload.php')) {
8 8
     throw new LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?');
9 9
 }
10 10
 
11 11
 /** @var \Composer\Autoload\ClassLoader $loader */
12 12
 $loader = require $loaderFile;
13
-$loader->add('', __DIR__.'/src/');
13
+$loader->add('', __DIR__ . '/src/');
14 14
 $loader->register();
15 15
 
16 16
 //require_once __DIR__ . '/src/Entity/TestEntity.php';
@@ -30,4 +30,4 @@  discard block
 block discarded – undo
30 30
 //$loader = require_once __DIR__.'/app/bootstrap.php.cache';
31 31
 
32 32
 //require_once __DIR__ . '/src/Test/TestBundle/TestTestBundle.php';
33
-require_once __DIR__.'/app/AppKernel.php';
33
+require_once __DIR__ . '/app/AppKernel.php';
Please login to merge, or discard this patch.
Controller/CRUDController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $hooks = [];
250 250
 
251 251
         foreach ($fields as $fieldName) {
252
-            $exporter->addHook(function ($fieldValue) {
252
+            $exporter->addHook(function($fieldValue) {
253 253
                 // if field is an array
254 254
                 if (is_array($fieldValue)) {
255 255
                     $value = recursiveImplode(', ', $fieldValue);
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         $this->forward404Unless(
295 295
             $admin->isActionGranted($admin->getCurrentAction()->getName(), $roles),
296 296
             sprintf('User with roles %s not allowed for action "%s"',
297
-                implode(', ', array_map(function (Role $role) {
297
+                implode(', ', array_map(function(Role $role) {
298 298
                     return $role->getRole();
299 299
                 }, $roles)),
300 300
                 $admin->getCurrentAction()->getName()
Please login to merge, or discard this patch.
Field/Field/ArrayField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function render($value)
28 28
     {
29 29
         if (!is_array($value) && !($value instanceof Traversable)) {
30
-            throw new Exception('Value should be an array instead of '.gettype($value));
30
+            throw new Exception('Value should be an array instead of ' . gettype($value));
31 31
         }
32 32
         if ($value instanceof Collection) {
33 33
             $value = $value->toArray();
Please login to merge, or discard this patch.
Field/Field/StringField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      */
84 84
     public function setOptions(array $options)
85 85
     {
86
-        $this->length = (int)$options['length'];
86
+        $this->length = (int) $options['length'];
87 87
         $this->replace = $options['replace'];
88 88
         $this->translation = $options['translation'];
89 89
     }
Please login to merge, or discard this patch.
Tests/AdminBundle/Field/ArrayFieldTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     public function testRender()
12 12
     {
13
-        $arrayField = new ArrayField ();
13
+        $arrayField = new ArrayField();
14 14
         $arrayField->setOptions([
15 15
             'glue' => ', '
16 16
         ]);
Please login to merge, or discard this patch.
Admin/Admin.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     /**
322 322
      * Return loaded entities
323 323
      *
324
-     * @return mixed
324
+     * @return ArrayCollection
325 325
      */
326 326
     public function getEntities()
327 327
     {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     }
398 398
 
399 399
     /**
400
-     * @return array
400
+     * @return integer[]
401 401
      */
402 402
     public function getActionNames()
403 403
     {
Please login to merge, or discard this patch.
Tests/AdminBundle/Admin/Factory/AdminFactoryTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
     /**
140 140
      * @param AdminInterface $admin
141 141
      * @param array $configuration
142
-     * @param $adminName
142
+     * @param string $adminName
143 143
      */
144 144
     protected function doTestAdmin(AdminInterface $admin, array $configuration, $adminName)
145 145
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         // test with no configuration
82 82
         $adminFactory = $this->mockAdminFactory();
83 83
         // unknow admin not exists, it should throw an exception
84
-        $this->assertExceptionRaised('Exception', function () use ($adminFactory) {
84
+        $this->assertExceptionRaised('Exception', function() use ($adminFactory) {
85 85
             $adminFactory->getAdmin('unknown_admin');
86 86
         });
87 87
         // test with configurations samples
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         // test with no configuration
106 106
         $adminFactory = $this->mockAdminFactory();
107 107
         // unknow admin not exists, it should throw an exception
108
-        $this->assertExceptionRaised('Exception', function () use ($adminFactory) {
108
+        $this->assertExceptionRaised('Exception', function() use ($adminFactory) {
109 109
             $adminFactory->getAdmin('unknown_admin');
110 110
         });
111 111
         // test with configurations samples
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         // test with no configuration
130 130
         $adminFactory = $this->mockAdminFactory();
131 131
         // unknow admin not exists, it should throw an exception
132
-        $this->assertExceptionRaised('Exception', function () use ($adminFactory) {
132
+        $this->assertExceptionRaised('Exception', function() use ($adminFactory) {
133 133
             $adminFactory->getAdmin('unknown_admin');
134 134
         });
135 135
         $dataProvider = $this->mockDataProvider();
Please login to merge, or discard this patch.