@@ -70,7 +70,7 @@ |
||
70 | 70 | $expected, |
71 | 71 | $result, |
72 | 72 | "extractFolder did not correctly extract the requested path for sub folder" |
73 | - ); |
|
73 | + ); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | public function extractFolderDataProvider() |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $_POST = []; |
33 | 33 | $_SERVER = []; |
34 | 34 | $_COOKIE = []; |
35 | - $_SERVER['DOCUMENT_ROOT'] = $basedir."/htdocs"; |
|
35 | + $_SERVER['DOCUMENT_ROOT'] = $basedir . "/htdocs"; |
|
36 | 36 | $_SERVER['SCRIPT_NAME'] = '/index.php'; |
37 | 37 | $_SERVER['REQUEST_URI'] = '/alias'; |
38 | 38 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $reflector = new ReflectionObject($router); |
66 | 66 | $method = $reflector->getMethod('extractFolder'); |
67 | 67 | $method->setAccessible(true); |
68 | - $result = $method->invoke($router, $requestedPath, $folder ); |
|
68 | + $result = $method->invoke($router, $requestedPath, $folder); |
|
69 | 69 | $this->assertEquals( |
70 | 70 | $expected, |
71 | 71 | $result, |
@@ -2,5 +2,5 @@ |
||
2 | 2 | namespace tests; |
3 | 3 | require_once dirname(__DIR__) . '/vendor/autoload.php'; |
4 | 4 | $loader = new \Composer\Autoload\ClassLoader(); |
5 | -$loader->add('test', dirname(__DIR__) ); |
|
5 | +$loader->add('test', dirname(__DIR__)); |
|
6 | 6 | $loader->register(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @param string $requestedPath |
53 | 53 | * @param string $folder |
54 | 54 | */ |
55 | - public function __construct(array $routes, string $defaultReturnType, string $method, string $requestedPath, string $folder='') |
|
55 | + public function __construct(array $routes, string $defaultReturnType, string $method, string $requestedPath, string $folder = '') |
|
56 | 56 | { |
57 | 57 | $this->routes = $routes; |
58 | 58 | $this->method = $method; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (!empty($folder)) { |
72 | 72 | $requestPath = '/' . trim(preg_replace('#^/' . $folder . '#msi', '/', $requestPath), "/"); |
73 | 73 | } |
74 | - if($requestPath == ''){ |
|
74 | + if ($requestPath == '') { |
|
75 | 75 | $requestPath = '/'; |
76 | 76 | } |
77 | 77 | return $requestPath; |