diff --git a/framework/helpers/BaseMarkdown.php b/framework/helpers/BaseMarkdown.php index 59bb3ec..6d8ee39 100644 --- a/framework/helpers/BaseMarkdown.php +++ b/framework/helpers/BaseMarkdown.php @@ -82,7 +82,7 @@ class BaseMarkdown * @return \cebe\markdown\Parser * @throws \yii\base\InvalidParamException when an undefined flavor is given. */ - private static function getParser($flavor) + protected static function getParser($flavor) { /** @var \cebe\markdown\Markdown $parser */ if (!isset(static::$flavors[$flavor])) { diff --git a/framework/helpers/BaseUrl.php b/framework/helpers/BaseUrl.php index d43882f..eb97526 100644 --- a/framework/helpers/BaseUrl.php +++ b/framework/helpers/BaseUrl.php @@ -108,7 +108,7 @@ class BaseUrl * @return string normalized route suitable for UrlManager * @throws InvalidParamException a relative route is given while there is no active controller */ - private static function normalizeRoute($route) + protected static function normalizeRoute($route) { $route = (string) $route; if (strncmp($route, '/', 1) === 0) { diff --git a/framework/rest/RateLimiter.php b/framework/rest/RateLimiter.php index d668e6d..8226f59 100644 --- a/framework/rest/RateLimiter.php +++ b/framework/rest/RateLimiter.php @@ -8,7 +8,6 @@ namespace yii\rest; use yii\base\Component; -use yii\base\Action; use yii\web\Request; use yii\web\Response; use yii\web\TooManyRequestsHttpException; @@ -37,7 +36,7 @@ class RateLimiter extends Component * @param RateLimitInterface $user the current user * @param Request $request * @param Response $response - * @param Action $action the action to be executed + * @param \yii\base\Action $action the action to be executed * @throws TooManyRequestsHttpException if rate limit exceeds */ public function check($user, $request, $response, $action) diff --git a/framework/web/UploadedFile.php b/framework/web/UploadedFile.php index c7648c1..bcfb989 100644 --- a/framework/web/UploadedFile.php +++ b/framework/web/UploadedFile.php @@ -56,6 +56,7 @@ class UploadedFile extends Object */ public $error; + /** * String output. * This is PHP magic method that returns string representation of an object. @@ -80,7 +81,6 @@ class UploadedFile extends Object public static function getInstance($model, $attribute) { $name = Html::getInputName($model, $attribute); - return static::getInstanceByName($name); } @@ -95,7 +95,6 @@ class UploadedFile extends Object public static function getInstances($model, $attribute) { $name = Html::getInputName($model, $attribute); - return static::getInstancesByName($name); } @@ -108,8 +107,7 @@ class UploadedFile extends Object */ public static function getInstanceByName($name) { - $files = static::loadFiles(); - + $files = self::loadFiles(); return isset($files[$name]) ? $files[$name] : null; } @@ -124,7 +122,7 @@ class UploadedFile extends Object */ public static function getInstancesByName($name) { - $files = static::loadFiles(); + $files = self::loadFiles(); if (isset($files[$name])) { return [$files[$name]]; } @@ -134,7 +132,6 @@ class UploadedFile extends Object $results[] = self::$_files[$key]; } } - return $results; } @@ -166,7 +163,6 @@ class UploadedFile extends Object return copy($this->tempName, $file); } } - return false; } @@ -209,7 +205,6 @@ class UploadedFile extends Object } } } - return self::$_files; }