@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function __construct() |
| 31 | 31 | { |
| 32 | - static::$yawikGlobalConfig = getcwd() . '/config/autoload/yawik.config.global.php'; |
|
| 32 | + static::$yawikGlobalConfig = getcwd().'/config/autoload/yawik.config.global.php'; |
|
| 33 | 33 | static::$yawikBackupConfig = str_replace('yawik.config.global.php', 'yawik.backup', static::$yawikGlobalConfig); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | /** |
| 60 | 60 | * Get required modules for Yawik |
| 61 | 61 | * |
| 62 | - * @return array |
|
| 62 | + * @return string[] |
|
| 63 | 63 | */ |
| 64 | 64 | public static function getRequiredModules() |
| 65 | 65 | { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | 195 | * Setup php server |
| 196 | - * @return bool |
|
| 196 | + * @return null|boolean |
|
| 197 | 197 | * @codeCoverageIgnore |
| 198 | 198 | */ |
| 199 | 199 | public static function setupCliServerEnv() |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @param array $loadModules |
| 96 | 96 | * @return array |
| 97 | 97 | */ |
| 98 | - public static function generateModuleConfiguration($loadModules=[]) |
|
| 98 | + public static function generateModuleConfiguration($loadModules = []) |
|
| 99 | 99 | { |
| 100 | 100 | $modules = ArrayUtils::merge( |
| 101 | 101 | static::getRequiredModules(), |
@@ -184,15 +184,15 @@ discard block |
||
| 184 | 184 | public static function setupCliServerEnv() |
| 185 | 185 | { |
| 186 | 186 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
| 187 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
| 188 | - if (is_file(__DIR__ . '/' . $route)) { |
|
| 187 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
| 188 | + if (is_file(__DIR__.'/'.$route)) { |
|
| 189 | 189 | if (substr($route, -4) == ".php") { |
| 190 | - require __DIR__ . '/' . $route; // Include requested script files |
|
| 190 | + require __DIR__.'/'.$route; // Include requested script files |
|
| 191 | 191 | exit; |
| 192 | 192 | } |
| 193 | - return false; // Serve file as is |
|
| 193 | + return false; // Serve file as is |
|
| 194 | 194 | } else { // Fallback to index.php |
| 195 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 195 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
| 196 | 196 | } |
| 197 | 197 | return true; |
| 198 | 198 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | public static function loadDotEnv() |
| 204 | 204 | { |
| 205 | - static $isLoaded=false; |
|
| 205 | + static $isLoaded = false; |
|
| 206 | 206 | if ($isLoaded) { |
| 207 | 207 | return; |
| 208 | 208 | } |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | // setup docker environment |
| 317 | - if (getenv('DOCKER_ENV')=='yes') { |
|
| 317 | + if (getenv('DOCKER_ENV') == 'yes') { |
|
| 318 | 318 | $configuration = ArrayUtils::merge($configuration, static::getDockerEnv($configuration)); |
| 319 | 319 | } |
| 320 | 320 | return $configuration; |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | |
| 381 | 381 | //$exp = explode("@", $info); |
| 382 | 382 | $version = $info->getVersion(); |
| 383 | - static::$version = substr($version, 0, strlen($version)-10); |
|
| 383 | + static::$version = substr($version, 0, strlen($version) - 10); |
|
| 384 | 384 | static::$revision = substr($version, 10); |
| 385 | 385 | } |
| 386 | 386 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function getConfig() |
| 29 | 29 | { |
| 30 | - return ModuleConfigLoader::load(__DIR__ . '/../config'); |
|
| 30 | + return ModuleConfigLoader::load(__DIR__.'/../config'); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $createJobListener->attachShared($sharedManager); |
| 42 | 42 | |
| 43 | 43 | if ($e->getRequest() instanceof \Zend\Http\Request) { |
| 44 | - $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $event) { |
|
| 44 | + $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function(MvcEvent $event) { |
|
| 45 | 45 | $serviceManager = $event->getApplication() |
| 46 | 46 | ->getServiceManager(); |
| 47 | 47 | $options = $serviceManager->get('Organizations/ImageFileCacheOptions'); |
@@ -156,6 +156,9 @@ |
||
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | + /** |
|
| 160 | + * @param string $message |
|
| 161 | + */ |
|
| 159 | 162 | private function log($message) |
| 160 | 163 | { |
| 161 | 164 | $io = $this->io; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | : $email; |
| 51 | 51 | |
| 52 | 52 | $attributesStr = $attributes |
| 53 | - ? (' ' . $this->createAttributesString($attributes)) |
|
| 53 | + ? (' '.$this->createAttributesString($attributes)) |
|
| 54 | 54 | : ''; |
| 55 | 55 | |
| 56 | 56 | return sprintf('<a%s href="mailto:%s">%s</a>', $attributesStr, $email, $label); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $attr = array(); |
| 70 | 70 | |
| 71 | 71 | foreach ($attributes as $name => $value) { |
| 72 | - $attr[] = $escape($name) . (strlen($value) ? ('="' . $escapeAttr($value) . '"') : ''); |
|
| 72 | + $attr[] = $escape($name).(strlen($value) ? ('="'.$escapeAttr($value).'"') : ''); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | return implode(' ', $attr); |