diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php index 9b24aeec3..1c8cb680a 100644 --- a/Dispatcher/Dispatcher.php +++ b/Dispatcher/Dispatcher.php @@ -178,6 +178,7 @@ class Dispatcher // If module controller use module manager for initialization if(strpos('\Modules\Controller', $controller) === 0) { + $split = explode('\\', $controller); $this->controllers[$controller] = $this->app->moduleManager->get($split[2]); } else { $this->controllers[$controller] = new $controller($this->app); diff --git a/Localization/Money.php b/Localization/Money.php index dddc54c0c..3d805fbe0 100644 --- a/Localization/Money.php +++ b/Localization/Money.php @@ -54,7 +54,7 @@ class Money implements \Serializable /** * Currency symbol position * - * @var string + * @var int * @since 1.0.0 */ private $position = 1; diff --git a/Message/Http/Request.php b/Message/Http/Request.php index 60badbd4d..acac47d42 100644 --- a/Message/Http/Request.php +++ b/Message/Http/Request.php @@ -45,14 +45,14 @@ class Request extends RequestAbstract /** * Browser type. * - * @var BrowserType + * @var string * @since 1.0.0 */ private $browser = BrowserType::CHROME; /** * OS type. * - * @var OSType + * @var string * @since 1.0.0 */ private $os = OSType::LINUX; @@ -282,7 +282,7 @@ class Request extends RequestAbstract if (!isset($this->browser)) { $arr = BrowserType::getConstants(); $http_request_type = strtolower($_SERVER['HTTP_USER_AGENT']); - + foreach ($arr as $key => $val) { if (stripos($http_request_type, $val)) { $this->browser = $val; diff --git a/Message/RequestAbstract.php b/Message/RequestAbstract.php index b3cc27a4b..5133b8204 100644 --- a/Message/RequestAbstract.php +++ b/Message/RequestAbstract.php @@ -110,7 +110,7 @@ abstract class RequestAbstract implements MessageInterface * @var \phpOMS\Message\RequestSource * @since 1.0.0 */ - private $source = RequestSource::UNDEFINED; + protected $source = RequestSource::UNDEFINED; /** * Request hash. diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php index ec8621772..8c194509f 100644 --- a/Utils/ArrayUtils.php +++ b/Utils/ArrayUtils.php @@ -294,7 +294,7 @@ class ArrayUtils // see collection collapse as alternative?! $flat = []; $stack = array_values($array); - while ($stack) { + while (!empty($stack)) { $value = array_shift($stack); if (is_array($value)) {