Commit 0b2aafc7 by Carsten Brandt

fixed private / self in helpers

fixes #2886
parent d774e7f1
......@@ -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])) {
......
......@@ -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) {
......
......@@ -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)
......
......@@ -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;
}
......
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