Commit 0b2aafc7 by Carsten Brandt

fixed private / self in helpers

fixes #2886
parent d774e7f1
...@@ -82,7 +82,7 @@ class BaseMarkdown ...@@ -82,7 +82,7 @@ class BaseMarkdown
* @return \cebe\markdown\Parser * @return \cebe\markdown\Parser
* @throws \yii\base\InvalidParamException when an undefined flavor is given. * @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 */ /** @var \cebe\markdown\Markdown $parser */
if (!isset(static::$flavors[$flavor])) { if (!isset(static::$flavors[$flavor])) {
......
...@@ -108,7 +108,7 @@ class BaseUrl ...@@ -108,7 +108,7 @@ class BaseUrl
* @return string normalized route suitable for UrlManager * @return string normalized route suitable for UrlManager
* @throws InvalidParamException a relative route is given while there is no active controller * @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; $route = (string) $route;
if (strncmp($route, '/', 1) === 0) { if (strncmp($route, '/', 1) === 0) {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
namespace yii\rest; namespace yii\rest;
use yii\base\Component; use yii\base\Component;
use yii\base\Action;
use yii\web\Request; use yii\web\Request;
use yii\web\Response; use yii\web\Response;
use yii\web\TooManyRequestsHttpException; use yii\web\TooManyRequestsHttpException;
...@@ -37,7 +36,7 @@ class RateLimiter extends Component ...@@ -37,7 +36,7 @@ class RateLimiter extends Component
* @param RateLimitInterface $user the current user * @param RateLimitInterface $user the current user
* @param Request $request * @param Request $request
* @param Response $response * @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 * @throws TooManyRequestsHttpException if rate limit exceeds
*/ */
public function check($user, $request, $response, $action) public function check($user, $request, $response, $action)
......
...@@ -56,6 +56,7 @@ class UploadedFile extends Object ...@@ -56,6 +56,7 @@ class UploadedFile extends Object
*/ */
public $error; public $error;
/** /**
* String output. * String output.
* This is PHP magic method that returns string representation of an object. * This is PHP magic method that returns string representation of an object.
...@@ -80,7 +81,6 @@ class UploadedFile extends Object ...@@ -80,7 +81,6 @@ class UploadedFile extends Object
public static function getInstance($model, $attribute) public static function getInstance($model, $attribute)
{ {
$name = Html::getInputName($model, $attribute); $name = Html::getInputName($model, $attribute);
return static::getInstanceByName($name); return static::getInstanceByName($name);
} }
...@@ -95,7 +95,6 @@ class UploadedFile extends Object ...@@ -95,7 +95,6 @@ class UploadedFile extends Object
public static function getInstances($model, $attribute) public static function getInstances($model, $attribute)
{ {
$name = Html::getInputName($model, $attribute); $name = Html::getInputName($model, $attribute);
return static::getInstancesByName($name); return static::getInstancesByName($name);
} }
...@@ -108,8 +107,7 @@ class UploadedFile extends Object ...@@ -108,8 +107,7 @@ class UploadedFile extends Object
*/ */
public static function getInstanceByName($name) public static function getInstanceByName($name)
{ {
$files = static::loadFiles(); $files = self::loadFiles();
return isset($files[$name]) ? $files[$name] : null; return isset($files[$name]) ? $files[$name] : null;
} }
...@@ -124,7 +122,7 @@ class UploadedFile extends Object ...@@ -124,7 +122,7 @@ class UploadedFile extends Object
*/ */
public static function getInstancesByName($name) public static function getInstancesByName($name)
{ {
$files = static::loadFiles(); $files = self::loadFiles();
if (isset($files[$name])) { if (isset($files[$name])) {
return [$files[$name]]; return [$files[$name]];
} }
...@@ -134,7 +132,6 @@ class UploadedFile extends Object ...@@ -134,7 +132,6 @@ class UploadedFile extends Object
$results[] = self::$_files[$key]; $results[] = self::$_files[$key];
} }
} }
return $results; return $results;
} }
...@@ -166,7 +163,6 @@ class UploadedFile extends Object ...@@ -166,7 +163,6 @@ class UploadedFile extends Object
return copy($this->tempName, $file); return copy($this->tempName, $file);
} }
} }
return false; return false;
} }
...@@ -209,7 +205,6 @@ class UploadedFile extends Object ...@@ -209,7 +205,6 @@ class UploadedFile extends Object
} }
} }
} }
return self::$_files; return self::$_files;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment