Типы для php-lint v2

This commit is contained in:
origami11 2021-02-22 14:07:51 +03:00
parent f570da257d
commit 6173eb4892
31 changed files with 83 additions and 76 deletions

View file

@ -54,9 +54,9 @@ class Controller_Component
public $component_title;
public $COMPONENTS_WEB;
public /*.Settings.*/$registry;
public /*.Database.*/$db;
public /*.Collection.*/$parameter;
public $registry/*: Settings*/;
public $db/*: Database*/;
public $parameter/*: Collection*/;
public $module;
public $item_module;
@ -88,7 +88,7 @@ class Controller_Component
public function getView($name)
{
//
/*.Settings.*/$registry = $this->registry;
$registry/*: Settings*/ = $this->registry;
$template = ($this->template) ? $this->template : $registry->readKey(array('system', 'template'));
$selected = null;
@ -128,7 +128,7 @@ class Controller_Component
}
public function getTemplatePath($name) {
/*.Settings.*/$registry = $this->registry;
$registry/*: Settings*/ = $this->registry;
$template = ($this->template) ? $this->template : $registry->readKey(array('system', 'template'));
foreach ($this->viewPath as $index => $viewPath) {
if(is_dir(Path::join($this->viewPath[$index], 'templates', $template))) {
@ -157,7 +157,7 @@ class Controller_Component
return $model;
}
public function options($key, $val, /*.Database_PDOStatement.*/$res) {
public function options($key, $val, $res/*: Database_PDOStatement*/) {
$result = array();
while($res->next()) {
$result[] = array('value' => $res->getString($key), 'name' => $res->getString($val));
@ -185,7 +185,7 @@ class Controller_Component
/**
* Генерация интерфейса для выбора галлереи фотографии
*/
public function setParameters(/*.View_Composite.*/$view)
public function setParameters($view/*: View_Composite*/)
{
$form = new Form_Form();
$options = new Form_OptionFactory($this->db, $this->registry);
@ -198,7 +198,7 @@ class Controller_Component
$view->component_title = $settings['title'];
}
static function loadComponent($expression, Database $db, /*.Registry.*/ $registry)
static function loadComponent($expression, Database $db, $registry/*: Registry*/)
{
$expression = htmlspecialchars_decode($expression);
@ -218,7 +218,7 @@ class Controller_Component
$path = Path::join (BASE_PATH, 'components', $name, $name . '.php');
$className = 'Component_' . $name;
/*.Controller_Component.*/$component = null;
$component/*: Controller_Component*/ = null;
if (file_exists($path)) {
require_once ($path);
@ -293,12 +293,12 @@ class Controller_Component
return null;
}
function raw_query(/*.ComponentRequest.*/ $request)
function raw_query($request/*: ComponentRequest*/)
{
$arr = $request->r->export('get');
$param = array();
/*.Collection.*/$parameter = $this->parameter;
$parameter/*: Collection*/ = $this->parameter;
foreach($parameter->export() as $key => $value) {
$param[$key] = $value;
}
@ -316,7 +316,7 @@ class Controller_Component
}
function query(/*.ComponentRequest.*/ $request, $list)
function query($request/*: ComponentRequest*/, $list)
{
$arr = $request->r->export('get');
@ -336,7 +336,7 @@ class Controller_Component
Controller_Site::addRequireJsPath($name, $path, $shim);
}
function actionIndex(/*.ComponentRequest.*/ $request) {
function actionIndex($request/*: ComponentRequest*/) {
}
}