Completed
Pull Request — master (#166)
by Arnaud
05:57 queued 02:08
created
tests/AdminBundle/Admin/Helper/AdminHelperTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
         $this->assertEquals($admin, $helper->getCurrent());
22 22
 
23
-        $this->assertExceptionRaised(Exception::class, function () use ($helper, $admin) {
23
+        $this->assertExceptionRaised(Exception::class, function() use ($helper, $admin) {
24 24
             $helper->setCurrent($admin);
25 25
         });
26 26
     }
Please login to merge, or discard this patch.
tests/AdminBundle/Bridge/Doctrine/ORM/Metadata/MetadataHelperTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $metadata
49 49
             ->expects($this->atLeastOnce())
50 50
             ->method('getFieldMapping')
51
-            ->willReturnCallback(function (string $field) use ($fields) {
51
+            ->willReturnCallback(function(string $field) use ($fields) {
52 52
                 $this->assertArrayHasKey($field, $fields);
53 53
 
54 54
                 return [
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $metadata
60 60
             ->expects($this->atLeastOnce())
61 61
             ->method('getTypeOfField')
62
-            ->willReturnCallback(function (string $field) use ($fields) {
62
+            ->willReturnCallback(function(string $field) use ($fields) {
63 63
                 $this->assertArrayHasKey($field, $fields);
64 64
 
65 65
                 return 'string';
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $metadataFactory
100 100
             ->expects($this->once())
101 101
             ->method('getMetadataFor')
102
-            ->willReturnCallback(function (string $class) {
102
+            ->willReturnCallback(function(string $class) {
103 103
                 $this->assertEquals('MyLittleClass', $class);
104 104
 
105 105
                 throw new Exception();
Please login to merge, or discard this patch.
src/Configuration/MenuConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                     'class' => 'list-group cms-menu-'.$this->menuName,
34 34
                 ],
35 35
             ])
36
-            ->setNormalizer('children', function (Options $options, $value) {
36
+            ->setNormalizer('children', function(Options $options, $value) {
37 37
                 if (!is_array($value)) {
38 38
                     throw new Exception('The menu items should an array for menu "'.$this->menuName.'"');
39 39
                 }
Please login to merge, or discard this patch.
src/Configuration/MenuItemConfiguration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 'text' => null,
45 45
                 'children' => [],
46 46
             ])
47
-            ->setNormalizer('admin', function (Options $options, $adminName) {
47
+            ->setNormalizer('admin', function(Options $options, $adminName) {
48 48
                 // user has to defined either an admin name and an action name, or a route name with optional
49 49
                 // parameters, or an url
50 50
                 if (null === $adminName
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 return $adminName;
58 58
             })
59 59
             // if an admin name is set, an action name can provided. This action will be the menu link
60
-            ->setNormalizer('action', function (Options $options, $action) {
60
+            ->setNormalizer('action', function(Options $options, $action) {
61 61
                 // if an action name is provided, an admin name should be defined too
62 62
                 if (null !== $action && null === $options->offsetGet('admin')) {
63 63
                     throw new InvalidOptionsException('You should provide an admin name for this action '.$action);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
                 return $action;
72 72
             })
73
-            ->setNormalizer('children', function (Options $options, $items) {
73
+            ->setNormalizer('children', function(Options $options, $items) {
74 74
                 if (!is_array($items)) {
75 75
                     $items = [];
76 76
                 }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
                 return $resolvedItems;
89 89
             })
90
-            ->setNormalizer('text', function (Options $options, $text) {
90
+            ->setNormalizer('text', function(Options $options, $text) {
91 91
                 if ($text) {
92 92
                     return $text;
93 93
                 }
Please login to merge, or discard this patch.
tests/AdminBundle/Factory/ViewFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@
 block discarded – undo
223 223
 
224 224
     public function testCreateRedirectionWithException()
225 225
     {
226
-        list($factory, , ,) = $this->createFactory();
226
+        list($factory,,,) = $this->createFactory();
227 227
 
228 228
         $request = $this->createMock(Request::class);
229 229
         $adminConfiguration = $this->createMock(AdminConfiguration::class);
Please login to merge, or discard this patch.
tests/AdminBundle/Bridge/Doctrine/ORM/DataProvider/ORMDataProviderTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
         ]);
154 154
         $this->expectException(Exception::class);
155 155
 
156
-         $provider->get($admin, 42);
156
+            $provider->get($admin, 42);
157 157
     }
158 158
 
159 159
     public function testSaveItem()
Please login to merge, or discard this patch.
tests/AdminBundle/Admin/AdminTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $eventDispatcher
53 53
             ->expects($this->exactly(6))
54 54
             ->method('dispatch')
55
-            ->willReturnCallback(function ($event, $eventName) use ($action, $form, $entities) {
55
+            ->willReturnCallback(function($event, $eventName) use ($action, $form, $entities) {
56 56
                 if (Events::ADMIN_HANDLE_REQUEST === $eventName) {
57 57
                     /** @var AdminEvent $event */
58 58
                     $this->assertInstanceOf(AdminEvent::class, $event);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         );
81 81
         $request = new Request();
82 82
 
83
-        $this->assertExceptionRaised(Exception::class, function () use ($admin) {
83
+        $this->assertExceptionRaised(Exception::class, function() use ($admin) {
84 84
             $admin->getRequest();
85 85
         });
86 86
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $this->assertCount(1, $admin->getForms());
101 101
         $this->assertEquals($form, $admin->getForms()['entity']);
102 102
         $this->assertEquals($form, $admin->getForm('entity'));
103
-        $this->assertExceptionRaised(Exception::class, function () use ($admin) {
103
+        $this->assertExceptionRaised(Exception::class, function() use ($admin) {
104 104
             $admin->getForm('invalid');
105 105
         });
106 106
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function getHandleRequestProvider(): array
109 109
     {
110 110
         return [
111
-            [['test',],],
111
+            [['test', ], ],
112 112
             [[]]
113 113
         ];
114 114
     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         );
137 137
         $request = new Request();
138 138
 
139
-        $this->assertExceptionRaised(Exception::class, function () use ($admin, $request) {
139
+        $this->assertExceptionRaised(Exception::class, function() use ($admin, $request) {
140 140
             $admin->handleRequest($request);
141 141
         });
142 142
     }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $eventDispatcher
152 152
             ->expects($this->once())
153 153
             ->method('dispatch')
154
-            ->willReturnCallback(function ($event, $eventName) use ($view) {
154
+            ->willReturnCallback(function($event, $eventName) use ($view) {
155 155
                 $this->assertEquals(Events::ADMIN_VIEW, $eventName);
156 156
                 /** @var ViewEvent $event */
157 157
                 $this->assertInstanceOf(ViewEvent::class, $event);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $eventDispatcher
210 210
             ->expects($this->exactly(5))
211 211
             ->method('dispatch')
212
-            ->willReturnCallback(function ($event, $eventName) use ($action) {
212
+            ->willReturnCallback(function($event, $eventName) use ($action) {
213 213
                 $this->assertContains($eventName, [
214 214
                     Events::ADMIN_HANDLE_REQUEST,
215 215
                     Events::ADMIN_FILTER,
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $eventDispatcher
246 246
             ->expects($this->exactly(5))
247 247
             ->method('dispatch')
248
-            ->willReturnCallback(function ($event, $eventName) use ($action, $form) {
248
+            ->willReturnCallback(function($event, $eventName) use ($action, $form) {
249 249
                 if (Events::ADMIN_HANDLE_REQUEST === $eventName) {
250 250
                     /** @var AdminEvent $event */
251 251
                     $this->assertInstanceOf(AdminEvent::class, $event);
Please login to merge, or discard this patch.