chore: Добавлены аннотации к типам
This commit is contained in:
parent
48269bd424
commit
ad920f656c
14 changed files with 127 additions and 127 deletions
|
|
@ -13,12 +13,12 @@ use PHPTAL_Php_TalesInternal,
|
|||
|
||||
class Tales_DateTime implements PHPTAL_Tales
|
||||
{
|
||||
static public function date($expression, $nothrow = false): string
|
||||
static public function date(string $expression, $nothrow = false): string
|
||||
{
|
||||
return "ctiso\\Tales::phptal_date(".PHPTAL_Php_TalesInternal::path($expression).")";
|
||||
}
|
||||
|
||||
static public function time($expression, $nothrow = false): string
|
||||
static public function time(string $expression, $nothrow = false): string
|
||||
{
|
||||
return "ctiso\\Tales::phptal_time(".PHPTAL_Php_TalesInternal::path($expression).")";
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ class Tales_DateTime implements PHPTAL_Tales
|
|||
|
||||
class Tales_Component implements PHPTAL_Tales
|
||||
{
|
||||
static public function component($expression, $nothrow = false): string
|
||||
static public function component(string $expression, $nothrow = false): string
|
||||
{
|
||||
$s = PHPTAL_Php_TalesInternal::string($expression);
|
||||
return "ctiso\\Tales::phptal_component(" . $s . ")";
|
||||
|
|
@ -35,7 +35,7 @@ class Tales_Component implements PHPTAL_Tales
|
|||
|
||||
class Tales_Assets implements PHPTAL_Tales
|
||||
{
|
||||
static public function assets($expression, $nothrow = false): string
|
||||
static public function assets(string $expression, $nothrow = false): string
|
||||
{
|
||||
$s = PHPTAL_Php_TalesInternal::string($expression);
|
||||
return "ctiso\\Tales::phptal_asset(" . $s . ")";
|
||||
|
|
@ -43,18 +43,18 @@ class Tales_Assets implements PHPTAL_Tales
|
|||
}
|
||||
|
||||
class Tales {
|
||||
/** @var SiteInterface */
|
||||
/** @var ?SiteInterface */
|
||||
static $site;
|
||||
|
||||
static function phptal_date ($e): string {
|
||||
static function phptal_date (int $e): string {
|
||||
return date("d.m.Y", $e);
|
||||
}
|
||||
|
||||
static function phptal_time ($e): string {
|
||||
static function phptal_time (int $e): string {
|
||||
return date("H:i", $e);
|
||||
}
|
||||
|
||||
static function phptal_asset($s): string {
|
||||
static function phptal_asset(string $s): string {
|
||||
self::$site->addStyleSheet($s);
|
||||
return "";
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ class Tales {
|
|||
}
|
||||
|
||||
|
||||
static function register($site) {
|
||||
static function register(?SiteInterface $site) {
|
||||
self::$site = $site;
|
||||
|
||||
/* Регистрация нового префикса для подключения компонента */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue