chore: Аннотации к типам
This commit is contained in:
parent
5e8958969f
commit
f964472e62
28 changed files with 140 additions and 36 deletions
|
|
@ -13,6 +13,7 @@ use ctiso\Database;
|
|||
use ctiso\Collection;
|
||||
use ctiso\Registry;
|
||||
use ctiso\Controller\SiteInterface;
|
||||
use ctiso\Database\PDOStatement;
|
||||
use PHPTAL;
|
||||
use PHPTAL_PreFilter_Normalize;
|
||||
|
||||
|
|
@ -249,7 +250,8 @@ class Component
|
|||
/**
|
||||
* @param string $key
|
||||
* @param string $val
|
||||
* @param $res
|
||||
* @param PDOStatement $res
|
||||
* @return array{value: string, name: string}[]
|
||||
*/
|
||||
public function options(string $key, string $val, $res) {
|
||||
$result = [];
|
||||
|
|
@ -262,7 +264,7 @@ class Component
|
|||
/**
|
||||
* @param array $list
|
||||
* @param bool $selected
|
||||
* @return array
|
||||
* @return array{value: string, name: string, selected: bool}[]
|
||||
*/
|
||||
public function optionsPair(array $list, $selected = false) {
|
||||
$result = [];
|
||||
|
|
@ -288,6 +290,10 @@ class Component
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Получить информацию о параметрах
|
||||
* @return array<mixed>
|
||||
*/
|
||||
function getInfo() {
|
||||
$filename = Path::join($this->viewPath[count($this->viewPath) - 1], 'install.json');
|
||||
if (file_exists($filename)) {
|
||||
|
|
@ -502,4 +508,11 @@ class Component
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param HttpRequest $request
|
||||
* @return array
|
||||
*/
|
||||
function getDefaultPageEnvironment($request) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue