@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | $dotenv = new Dotenv(); |
35 | 35 | $dotenv->load($env); |
36 | 36 | } |
37 | - $isVendor = strpos(__FILE__, 'modules')!==false || strpos(__FILE__, 'vendor') !== false; |
|
38 | - $version = getenv('TRAVIS') || $isVendor ? "undefined":exec('git describe'); |
|
39 | - $branch = getenv('TRAVIS') || $isVendor ? "undefined":exec('git rev-parse --abbrev-ref HEAD', $output, $retVal); |
|
37 | + $isVendor = strpos(__FILE__, 'modules') !== false || strpos(__FILE__, 'vendor') !== false; |
|
38 | + $version = getenv('TRAVIS') || $isVendor ? "undefined" : exec('git describe'); |
|
39 | + $branch = getenv('TRAVIS') || $isVendor ? "undefined" : exec('git rev-parse --abbrev-ref HEAD', $output, $retVal); |
|
40 | 40 | static::$VERSION = $version.'['.$branch.']'; |
41 | 41 | } |
42 | 42 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * @param array $loadModules |
77 | 77 | * @return array |
78 | 78 | */ |
79 | - public static function generateModuleConfiguration($loadModules=[]) |
|
79 | + public static function generateModuleConfiguration($loadModules = []) |
|
80 | 80 | { |
81 | 81 | return ArrayUtils::merge( |
82 | 82 | static::getRequiredModules(), |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $file = null; |
104 | 104 | if (is_file($test = getcwd().'/test/config/config.php')) { |
105 | 105 | $file = $test; |
106 | - } elseif (is_file($test = getcwd(). '/config/config.php')) { |
|
106 | + } elseif (is_file($test = getcwd().'/config/config.php')) { |
|
107 | 107 | $file = $test; |
108 | 108 | } elseif (is_file($test = __DIR__.'/../config/config.php')) { |
109 | 109 | $file = $test; |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | return ZendApplication::init($appConfig); |
124 | 124 | } |
125 | 125 | |
126 | - public static function runApplication($appConfig=null) |
|
126 | + public static function runApplication($appConfig = null) |
|
127 | 127 | { |
128 | 128 | ini_set('display_errors', true); |
129 | 129 | ini_set('error_reporting', E_ALL | E_STRICT); |
@@ -138,15 +138,15 @@ discard block |
||
138 | 138 | |
139 | 139 | if (php_sapi_name() == 'cli-server') { |
140 | 140 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
141 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
142 | - if (is_file(__DIR__ . '/' . $route)) { |
|
141 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
142 | + if (is_file(__DIR__.'/'.$route)) { |
|
143 | 143 | if (substr($route, -4) == ".php") { |
144 | - require __DIR__ . '/' . $route; // Include requested script files |
|
144 | + require __DIR__.'/'.$route; // Include requested script files |
|
145 | 145 | exit; |
146 | 146 | } |
147 | - return false; // Serve file as is |
|
147 | + return false; // Serve file as is |
|
148 | 148 | } else { // Fallback to index.php |
149 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
149 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
150 | 150 | } |
151 | 151 | } |
152 | 152 | return static::initApplication($appConfig)->run(); |