Fix phpstan violations in unrelated code

This commit is contained in:
Michael Stilkerich 2020-07-22 20:22:11 +02:00
parent 9ea671b98f
commit 02fc6efd6a
4 changed files with 4 additions and 2 deletions

View file

@ -48,8 +48,6 @@ class Cli extends \Flake\Core\Render\Container {
}
}
/**************************************************************************/
public $sLog = "";
function sys_init() {

View file

@ -115,6 +115,7 @@ class Collection extends \Flake\Core\FLObject implements \Iterator {
}
$var = null; # two lines instead of one
return $var; # as PHP needs a variable to return by ref
}
@ -148,6 +149,7 @@ class Collection extends \Flake\Core\FLObject implements \Iterator {
# This abstraction is useful because of CollectionTyped
protected function newCollectionLikeThisOne() {
$oCollection = new \Flake\Core\Collection(); # two lines instead of one
return $oCollection; # as PHP needs a variable to return by ref
}

View file

@ -112,6 +112,7 @@ abstract class Router extends \Flake\Core\FLObject {
$sCurrentRoute = $GLOBALS["ROUTER"]::getCurrentRoute();
array_unshift($aParams, $sCurrentRoute); # Injecting route as first param
return call_user_func_array($GLOBALS["ROUTER"] . "::buildRoute", $aParams);
}

View file

@ -51,6 +51,7 @@ class QuestionMarkRewrite extends \Flake\Util\Router {
}
$aBestMatches = array_pop($aMatches); // obtains the deepest matching route (higher number of slashes)
return array_shift($aBestMatches); // first route amongst best matches
}