fix: phpstan level=6
This commit is contained in:
parent
acbf2c847d
commit
48269bd424
41 changed files with 324 additions and 347 deletions
|
|
@ -13,18 +13,20 @@ use PHPTAL_Php_TalesInternal,
|
|||
|
||||
class Tales_DateTime implements PHPTAL_Tales
|
||||
{
|
||||
static public function date($expression, $nothrow = false) {
|
||||
static public function date($expression, $nothrow = false): string
|
||||
{
|
||||
return "ctiso\\Tales::phptal_date(".PHPTAL_Php_TalesInternal::path($expression).")";
|
||||
}
|
||||
|
||||
static public function time($expression, $nothrow = false) {
|
||||
static public function time($expression, $nothrow = false): string
|
||||
{
|
||||
return "ctiso\\Tales::phptal_time(".PHPTAL_Php_TalesInternal::path($expression).")";
|
||||
}
|
||||
}
|
||||
|
||||
class Tales_Component implements PHPTAL_Tales
|
||||
{
|
||||
static public function component($expression, $nothrow = false)
|
||||
static public function component($expression, $nothrow = false): string
|
||||
{
|
||||
$s = PHPTAL_Php_TalesInternal::string($expression);
|
||||
return "ctiso\\Tales::phptal_component(" . $s . ")";
|
||||
|
|
@ -33,7 +35,7 @@ class Tales_Component implements PHPTAL_Tales
|
|||
|
||||
class Tales_Assets implements PHPTAL_Tales
|
||||
{
|
||||
static public function assets($expression, $nothrow = false)
|
||||
static public function assets($expression, $nothrow = false): string
|
||||
{
|
||||
$s = PHPTAL_Php_TalesInternal::string($expression);
|
||||
return "ctiso\\Tales::phptal_asset(" . $s . ")";
|
||||
|
|
@ -44,15 +46,15 @@ class Tales {
|
|||
/** @var SiteInterface */
|
||||
static $site;
|
||||
|
||||
static function phptal_date ($e) {
|
||||
static function phptal_date ($e): string {
|
||||
return date("d.m.Y", $e);
|
||||
}
|
||||
|
||||
static function phptal_time ($e) {
|
||||
static function phptal_time ($e): string {
|
||||
return date("H:i", $e);
|
||||
}
|
||||
|
||||
static function phptal_asset($s) {
|
||||
static function phptal_asset($s): string {
|
||||
self::$site->addStyleSheet($s);
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue