Passed
Push — develop ( 86ca6f...0e6a78 )
by Mathias
22:00 queued 14:21
created
module/Organizations/src/Options/ImageFileCacheOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     public function __construct($options = null)
47 47
     {
48 48
         // We are relative to the application dir (see public/index.php)
49
-        $this->filePath = 'public' . $this->uriPath;
49
+        $this->filePath = 'public'.$this->uriPath;
50 50
         
51 51
         parent::__construct($options);
52 52
     }
Please login to merge, or discard this patch.
module/Core/test/CoreConfig.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 return array(
4 4
     // This should be an array of module namespaces used in the application.
5 5
     'modules' => array_merge($commonModules,[
6
-	    'Core',
7
-	    'Auth',
6
+        'Core',
7
+        'Auth',
8 8
     ]),
9 9
 
10 10
     // These are various options for the listeners attached to the ModuleManager
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     //     ),
61 61
     // )
62 62
 
63
-   // Initial configuration with which to seed the ServiceManager.
64
-   // Should be compatible with Zend\ServiceManager\Config.
65
-   // 'service_manager' => array(),
63
+    // Initial configuration with which to seed the ServiceManager.
64
+    // Should be compatible with Zend\ServiceManager\Config.
65
+    // 'service_manager' => array(),
66 66
 );
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 $commonModules = include __DIR__.'/../../../config/common.modules.php';
3 3
 return array(
4 4
     // This should be an array of module namespaces used in the application.
5
-    'modules' => array_merge($commonModules,[
5
+    'modules' => array_merge($commonModules, [
6 6
 	    'Core',
7 7
 	    'Auth',
8 8
     ]),
Please login to merge, or discard this patch.
module/Core/test/TestConfig.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@  discard block
 block discarded – undo
2 2
 return array(
3 3
     // This should be an array of module namespaces used in the application.
4 4
     'modules' => array_merge(
5
-    	include_once __DIR__.'/../../../config/common.modules.php',
6
-	    array(
5
+        include_once __DIR__.'/../../../config/common.modules.php',
6
+        array(
7 7
             'Core', 'Auth', 'Jobs', 'Applications', 'Organizations'
8
-	    )
8
+        )
9 9
     ),
10 10
 
11 11
     // These are various options for the listeners attached to the ModuleManager
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     //     ),
62 62
     // )
63 63
 
64
-   // Initial configuration with which to seed the ServiceManager.
65
-   // Should be compatible with Zend\ServiceManager\Config.
66
-   // 'service_manager' => array(),
64
+    // Initial configuration with which to seed the ServiceManager.
65
+    // Should be compatible with Zend\ServiceManager\Config.
66
+    // 'service_manager' => array(),
67 67
 );
68 68
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Exception/MissingDependencyExceptionTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $target = new MissingDependencyException($dependency, $object, $previous);
56 56
 
57 57
         $expectedMessage = sprintf('Missing dependency "%s" in "%s"',
58
-                                   $dependency, is_object($object) ? get_class($object) : $object);
58
+                                    $dependency, is_object($object) ? get_class($object) : $object);
59 59
 
60 60
         $this->assertEquals($expectedMessage, $target->getMessage());
61 61
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/LazyControllerFactoryTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * @dataProvider invokeTestProvider
37 37
      */
38
-    public function testInvoke($requestedName,$expectedClass)
38
+    public function testInvoke($requestedName, $expectedClass)
39 39
     {
40 40
         $moduleManager = $this->createMock(ModuleManagerInterface::class);
41 41
         $config = [];
@@ -54,26 +54,26 @@  discard block
 block discarded – undo
54 54
         $container->expects($this->any())
55 55
             ->method('get')
56 56
             ->willReturnMap([
57
-                ['config',$config],
58
-                ['ModuleManager',$moduleManager],
59
-                ['repositories',$repositories],
60
-                ['Core/EventManager',$eventManager]
57
+                ['config', $config],
58
+                ['ModuleManager', $moduleManager],
59
+                ['repositories', $repositories],
60
+                ['Core/EventManager', $eventManager]
61 61
             ])
62 62
         ;
63 63
 
64 64
         $factory = new LazyControllerFactory();
65 65
         $this->assertInstanceOf(
66 66
             $expectedClass,
67
-            $factory($container,$requestedName)
67
+            $factory($container, $requestedName)
68 68
         );
69 69
     }
70 70
 
71 71
     public function invokeTestProvider()
72 72
     {
73 73
         return [
74
-            ['Core/Index',IndexController::class],
75
-            ['Core/File',FileController::class],
76
-            ['Core/Content',ContentController::class],
74
+            ['Core/Index', IndexController::class],
75
+            ['Core/File', FileController::class],
76
+            ['Core/Content', ContentController::class],
77 77
         ];
78 78
     }
79 79
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $this->expectException(ServiceNotCreatedException::class);
85 85
         $this->expectExceptionMessageRegExp('/Can\'t find correct controller class for/');
86 86
         $factory = new LazyControllerFactory();
87
-        $factory($container,'Core/Foo');
87
+        $factory($container, 'Core/Foo');
88 88
     }
89 89
 
90 90
     public function testThrowsWhenCanNotCreateConstructorArgument()
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
         $this->expectException(ServiceNotCreatedException::class);
95 95
         $this->expectExceptionMessageRegExp('/Can\'t create constructor argument/m');
96 96
         $factory = new LazyControllerFactory();
97
-        $factory($container,'Core/Index');
97
+        $factory($container, 'Core/Index');
98 98
     }
99 99
 
100 100
     public function testCanCreate()
101 101
     {
102 102
         $container = $this->createMock(ContainerInterface::class);
103 103
         $factory = new LazyControllerFactory();
104
-        $this->assertFalse($factory->canCreate($container,'Foo\\Bar'));
105
-        $this->assertTrue($factory->canCreate($container,'Foo\\Controller\\Bar'));
104
+        $this->assertFalse($factory->canCreate($container, 'Foo\\Bar'));
105
+        $this->assertTrue($factory->canCreate($container, 'Foo\\Controller\\Bar'));
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/Controller/FileControllerFactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@
 block discarded – undo
33 33
         $container->expects($this->exactly(2))
34 34
             ->method('get')
35 35
             ->willReturnMap([
36
-                ['repositories',$repositories],
37
-                ['Core/File/Events',$coreFileEvents]
36
+                ['repositories', $repositories],
37
+                ['Core/File/Events', $coreFileEvents]
38 38
             ])
39 39
         ;
40 40
 
41 41
         $factory = new FileControllerFactory();
42 42
         $this->assertInstanceOf(
43 43
             FileController::class,
44
-            $factory($container,'some-name')
44
+            $factory($container, 'some-name')
45 45
         );
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
Core/test/CoreTest/Factory/Controller/Plugin/SearchFormFactoryTest.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,17 +43,17 @@
 block discarded – undo
43 43
 
44 44
     public function testCreatesPluginAndInjectsFormElementManager()
45 45
     {
46
-	    $forms = $this->getMockBuilder(FormElementManager::class)
47
-		    ->disableOriginalConstructor()
48
-		    ->getMock()
49
-	    ;
50
-	    /*$services = $this->getServiceManagerMock([
46
+        $forms = $this->getMockBuilder(FormElementManager::class)
47
+            ->disableOriginalConstructor()
48
+            ->getMock()
49
+        ;
50
+        /*$services = $this->getServiceManagerMock([
51 51
 		    'forms' => [
52 52
 			    'service' => $forms,
53 53
 			    'count_get' => 1,
54 54
 		    ]]);*/
55
-	    $services = $this->getServiceManagerMock();
56
-	    $services->setService('forms',$forms);
55
+        $services = $this->getServiceManagerMock();
56
+        $services->setService('forms',$forms);
57 57
 	    
58 58
         $plugin = $this->target->__invoke($services,'irrelevant');
59 59
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     protected $target = SearchFormFactory::class;
41 41
 
42
-    protected $inheritance = [ FactoryInterface::class ];
42
+    protected $inheritance = [FactoryInterface::class];
43 43
 
44 44
     public function testCreatesPluginAndInjectsFormElementManager()
45 45
     {
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 			    'count_get' => 1,
54 54
 		    ]]);*/
55 55
 	    $services = $this->getServiceManagerMock();
56
-	    $services->setService('forms',$forms);
56
+	    $services->setService('forms', $forms);
57 57
 	    
58
-        $plugin = $this->target->__invoke($services,'irrelevant');
58
+        $plugin = $this->target->__invoke($services, 'irrelevant');
59 59
 
60 60
         $this->assertInstanceOf('\Core\Controller\Plugin\SearchForm', $plugin);
61 61
         $this->assertAttributeSame($forms, 'formElementManager', $plugin);
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/Controller/AdminControllerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $factory = new AdminControllerFactory();
31 31
         $this->assertInstanceOf(
32 32
             AdminController::class,
33
-            $factory($container,'Core/Admin')
33
+            $factory($container, 'Core/Admin')
34 34
         );
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/OptionsAbstractFactoryTest.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
         ];
55 55
 
56 56
         return [
57
-            [ [], 'testnameone', 'Test/Name.One', false ],
58
-            [ $cfg1, 'testnametwo', 'Test.Name/Two', true ],
59
-            [ $cfg1, 'othername', '', false ],
60
-            [ $cfg1, 'nonexistant', 'Non.Existant', false ],
57
+            [[], 'testnameone', 'Test/Name.One', false],
58
+            [$cfg1, 'testnametwo', 'Test.Name/Two', true],
59
+            [$cfg1, 'othername', '', false],
60
+            [$cfg1, 'nonexistant', 'Non.Existant', false],
61 61
         ];
62 62
     }
63 63
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $services = $this->getServiceLocatorMock($optionsConfig);
79 79
 
80
-        $method = "assert" . ($expected ? 'True' : 'False');
80
+        $method = "assert".($expected ? 'True' : 'False');
81 81
         $this->$method($target->canCreateServiceWithName($services, $name, $requestedName));
82 82
     }
83 83
 
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
         ];
90 90
 
91 91
         return [
92
-            [ [], 'Test/Name.One', false ],
93
-            [ $cfg1, 'Test.Name/Two', true ],
94
-            [ $cfg1, 'othername', true ],
95
-            [ $cfg1, 'Non.Existant', false ],
92
+            [[], 'Test/Name.One', false],
93
+            [$cfg1, 'Test.Name/Two', true],
94
+            [$cfg1, 'othername', true],
95
+            [$cfg1, 'Non.Existant', false],
96 96
         ];
97 97
     }
98 98
 
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
      * @param $requestedName
105 105
      * @param $expected
106 106
      */
107
-    public function testCanCreate($optionsConfig,$requestedName,$expected)
107
+    public function testCanCreate($optionsConfig, $requestedName, $expected)
108 108
     {
109 109
         $target = new OptionsAbstractFactory();
110 110
         $services = $this->getServiceLocatorMock($optionsConfig);
111 111
 
112 112
         $method = "assert".($expected ? 'True' : 'False');
113
-        $this->$method($target->canCreate($services,$requestedName));
113
+        $this->$method($target->canCreate($services, $requestedName));
114 114
     }
115 115
 
116 116
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $services = $this->getServiceLocatorMock([
144 144
             'TestOption' => [
145
-                'class' => __NAMESPACE__ . '\SimpleOptionsMock',
145
+                'class' => __NAMESPACE__.'\SimpleOptionsMock',
146 146
                 'mode' => 'invalid',
147 147
             ]
148 148
         ]);
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function testCreatesSimpleOptionsInstance()
160 160
     {
161
-        $optionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock';
161
+        $optionsMockClass = __NAMESPACE__.'\SimpleOptionsMock';
162 162
         $cfg = [
163 163
             'SimpleOptions' => [
164 164
                 'class' => $optionsMockClass,
165
-                'options' => [ 'one' => 'three' ]
165
+                'options' => ['one' => 'three']
166 166
             ]
167 167
         ];
168 168
 
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public function testCreateNestedOptionsInstance()
207 207
     {
208
-        $nestedOptionsMockClass = __NAMESPACE__ . '\NestedOptionsMock';
209
-        $simpleOptionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock';
208
+        $nestedOptionsMockClass = __NAMESPACE__.'\NestedOptionsMock';
209
+        $simpleOptionsMockClass = __NAMESPACE__.'\SimpleOptionsMock';
210 210
 
211 211
         $cfg = [
212 212
             'NestedOptions' => [
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
                 'mode' => OptionsAbstractFactory::MODE_NESTED,
215 215
                 'options' => [
216 216
                     'skalar' => 'itsworking',
217
-                    'array' => [ 'its' => 'working' ],
218
-                    'opt1' => [ '__class__' => $simpleOptionsMockClass ],
219
-                    'opt2' => [ '__class__' => $simpleOptionsMockClass, 'two' => 'four' ],
217
+                    'array' => ['its' => 'working'],
218
+                    'opt1' => ['__class__' => $simpleOptionsMockClass],
219
+                    'opt2' => ['__class__' => $simpleOptionsMockClass, 'two' => 'four'],
220 220
                 ],
221 221
             ],
222 222
         ];
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
 
231 231
         $this->assertInstanceOf($nestedOptionsMockClass, $options);
232 232
         $this->assertEquals('itsworking', $options->getSkalar());
233
-        $this->assertEquals([ 'its' => 'working' ], $options->getArray());
233
+        $this->assertEquals(['its' => 'working'], $options->getArray());
234 234
         $this->assertEquals('One', $options->getOpt1()->getOne());
235 235
         $this->assertEquals('four', $options->getOpt2()->getTwo());
236 236
     }
237 237
 
238 238
     protected function getServiceLocatorMock($optionsConfig = [])
239 239
     {
240
-        $optionsConfig = [ 'options' => $optionsConfig ];
240
+        $optionsConfig = ['options' => $optionsConfig];
241 241
         $services = $this->getMockBuilder('Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
242 242
 
243 243
         $services->expects($this->once())->method('get')->with('config')->willReturn($optionsConfig);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 class SimpleOptionsMock extends AbstractOptions
251 251
 {
252 252
     protected $one = "One";
253
-    protected $two= "Two";
253
+    protected $two = "Two";
254 254
 
255 255
     /**
256 256
      * @param string $one
Please login to merge, or discard this patch.