@@ -154,7 +154,7 @@ |
||
154 | 154 | { |
155 | 155 | $baseUrl = '/base'; |
156 | 156 | $path = '/some/uri'; |
157 | - $uri = $baseUrl . $path; |
|
157 | + $uri = $baseUrl.$path; |
|
158 | 158 | $this->event->setError(Application::ERROR_ROUTER_NO_MATCH); |
159 | 159 | |
160 | 160 | $this->request->expects($this->once()) |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | private $target = WriteAssertion::class; |
34 | 34 | |
35 | - private $inheritance = [ AssertionInterface::class ]; |
|
35 | + private $inheritance = [AssertionInterface::class]; |
|
36 | 36 | |
37 | 37 | public function dataProvider() |
38 | 38 | { |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | $validResourceWPerms->setUser($validRole); |
46 | 46 | |
47 | 47 | return [ |
48 | - [ $invalidRole, $invalidResource, 'invalidPrivilege', false ], |
|
49 | - [ $validRole, $invalidResource, 'invalid', false ], |
|
50 | - [ $invalidRole, $validResourceWoPerms, 'invalid', false ], |
|
51 | - [ $invalidRole, $validResourceWPerms, 'invalid', false ], |
|
52 | - [ $invalidRole, $invalidResource, 'edit', false ], |
|
53 | - [ $validRole, $invalidResource, 'edit', false ], |
|
54 | - [ $validRole, $validResourceWPerms, 'invalid', false ], |
|
55 | - [ $validRole, $validResourceWoPerms, 'edit', false ], |
|
56 | - [ $validRole, $validResourceWPerms, 'edit', true ], |
|
48 | + [$invalidRole, $invalidResource, 'invalidPrivilege', false], |
|
49 | + [$validRole, $invalidResource, 'invalid', false], |
|
50 | + [$invalidRole, $validResourceWoPerms, 'invalid', false], |
|
51 | + [$invalidRole, $validResourceWPerms, 'invalid', false], |
|
52 | + [$invalidRole, $invalidResource, 'edit', false], |
|
53 | + [$validRole, $invalidResource, 'edit', false], |
|
54 | + [$validRole, $validResourceWPerms, 'invalid', false], |
|
55 | + [$validRole, $validResourceWoPerms, 'edit', false], |
|
56 | + [$validRole, $validResourceWPerms, 'edit', true], |
|
57 | 57 | |
58 | 58 | ]; |
59 | 59 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$testConfig = include __DIR__ . '/TestConfig.php'; |
|
3 | +$testConfig = include __DIR__.'/TestConfig.php'; |
|
4 | 4 | |
5 | -require_once __DIR__ . '/../../../test/Bootstrap.php'; |
|
6 | 5 | \ No newline at end of file |
6 | +require_once __DIR__.'/../../../test/Bootstrap.php'; |
|
7 | 7 | \ No newline at end of file |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | $modules = array_merge( |
3 | - include_once __DIR__.'/../../../config/common.modules.php', |
|
4 | - [ |
|
5 | - 'Core', |
|
6 | - 'Auth', |
|
7 | - 'Jobs', |
|
8 | - 'Organizations' |
|
9 | - ] |
|
3 | + include_once __DIR__.'/../../../config/common.modules.php', |
|
4 | + [ |
|
5 | + 'Core', |
|
6 | + 'Auth', |
|
7 | + 'Jobs', |
|
8 | + 'Organizations' |
|
9 | + ] |
|
10 | 10 | ); |
11 | 11 | return array( |
12 | 12 | 'modules' => $modules, |
@@ -46,7 +46,7 @@ |
||
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 | } |
@@ -3,8 +3,8 @@ discard block |
||
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 |
||
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 |
@@ -2,7 +2,7 @@ |
||
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 | ]), |
@@ -2,10 +2,10 @@ discard block |
||
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 |
||
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 |
@@ -55,7 +55,7 @@ |
||
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 | } |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |