diff --git a/src/Collection.php b/src/Collection.php index 467175e..1370be3 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -39,7 +39,7 @@ class Collection implements ArrayAccess * * @return void */ - public function set(/*.string.*/$key, /*.any.*/$value) + public function set($key/*: string*/, $value/*: any*/) { $this->data[$key] = $value; } @@ -58,7 +58,7 @@ class Collection implements ArrayAccess public function getInt($key, $default = 0) { - return intval($this->get($key, $default)); + return (int)$this->get($key, $default); } public function getString($key, $default = '') @@ -68,7 +68,7 @@ class Collection implements ArrayAccess public function getNat($key, $default = 1) { - $result = intval($this->get($key, $default)); + $result = (int)$this->get($key, $default); return (($result > 0) ? $result : $default); } diff --git a/src/Connection/HttpResponse.php b/src/Connection/HttpResponse.php index 9e94c9f..7f78bb0 100644 --- a/src/Connection/HttpResponse.php +++ b/src/Connection/HttpResponse.php @@ -36,12 +36,12 @@ class Connection_HttpResponse if (isset($this->param['Transfer-Encoding']) && $this->param['Transfer-Encoding'] == 'chunked') { //$this->data = substr($this->response, $this->offset); - $line = hexdec($this->getLine()); + $nline = hexdec($this->getLine()); $chunk = array(); - while ($line > 0) { - $chunk [] = substr($this->response, $this->offset, $line); - $this->offset += $line; - $line = hexdec($this->getLine()); + while ($nline > 0) { + $chunk [] = substr($this->response, $this->offset, $nline); + $this->offset += $nline; + $nline = hexdec($this->getLine()); } $this->data = implode("", $chunk); diff --git a/src/Controller/Action.php b/src/Controller/Action.php index 6045d5b..df0de65 100644 --- a/src/Controller/Action.php +++ b/src/Controller/Action.php @@ -40,7 +40,7 @@ class Controller_Action private $helpers = array(); // Помошники для действий public $param = array(); // Параметры для ссылки - public /*.Registry.*/$_registry; // Ссылка на реестр + public $_registry/*: Registry*/; // Ссылка на реестр public $_shortcut; public $modulePrefix = ''; public $iconPath = ''; @@ -114,7 +114,7 @@ class Controller_Action if(file_exists($template)) { break; } } - /*.View_Composite.*/$tpl = new $viewClass($template); + $tpl/*: View_Composite*/ = new $viewClass($template); $assets = Path::join(enableHttps(WWW_PATH), "assets", "css"); $tpl->set('icons', $this->iconPath); // Путь к файлам текущей темы @@ -207,7 +207,7 @@ class Controller_Action */ public function nUrl($name, array $param = array()) { - /*.Filter_ActionAccess.*/$access = $this->access; + $access/*: Filter_ActionAccess*/ = $this->access; if ($access == null || $access->checkAction($name)) { return Functions::lcurry(array($this, 'postUrl'), $name, $param); @@ -331,7 +331,7 @@ class Controller_Action if ($this->view instanceof View_View) { $this->view->assignValues($this->ctrlValues); - /*.Widgets_Widget.*/$node = null; + $node/*: Widgets_Widget*/ = null; foreach ($this->childNodes as $name => $node) { $node->make($this); $this->view->setView($name, $node->view); diff --git a/src/Controller/Component.php b/src/Controller/Component.php index d77392e..e4db790 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -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*/) { } } diff --git a/src/Controller/Front.php b/src/Controller/Front.php index 0d42d4d..6574d04 100644 --- a/src/Controller/Front.php +++ b/src/Controller/Front.php @@ -94,7 +94,7 @@ class Controller_Front extends Controller_Action $this->default = $name; } - public function execute(HTTPRequest $request) + public function execute(HttpRequest $request) { $name = explode("_", $request->get($this->_param, $this->default)); if (count($name) >= 2) { diff --git a/src/Controller/Request.php b/src/Controller/Request.php index 01822e1..6567ad7 100644 --- a/src/Controller/Request.php +++ b/src/Controller/Request.php @@ -1,13 +1,17 @@ r = $request; $this->id = $id; } - function get($name) { + function get($name, $def = null) { $v = $this->r->get($name); + $id = $this->id; if ($id && is_array($v)) { return isset($v[$id]) ? $v[$id] : $def; } diff --git a/src/Database.php b/src/Database.php index 6dc72e9..acd8c59 100644 --- a/src/Database.php +++ b/src/Database.php @@ -5,7 +5,7 @@ require_once "Database/PDOStatement.php"; /** * Класс оболочка для PDO для замены Creole */ -class Database extends PDO +class Database/**/ extends PDO { public $dsn; @@ -37,7 +37,7 @@ class Database extends PDO if ($dsn['phptype'] == 'pgsql' || $dsn['phptype'] == 'mysql') { $port = (isset($dsn['port'])) ? "port={$dsn['port']};" : ""; - /*.Database.*/$connection = new static("{$dsn['phptype']}:host={$dsn['hostspec']}; $port dbname={$dsn['database']}", $dsn['username'], $dsn['password']); + $connection/*: Database*/ = new static("{$dsn['phptype']}:host={$dsn['hostspec']}; $port dbname={$dsn['database']}", $dsn['username'], $dsn['password']); if ($dsn['phptype'] == 'pgsql') { $connection->query('SET client_encoding="UTF-8"'); } @@ -47,7 +47,7 @@ class Database extends PDO } } if ($dsn['phptype'] == 'sqlite') { - /*.Database.*/$connection = new static("{$dsn['phptype']}:{$dsn['database']}"); + $connection/*: Database*/ = new static("{$dsn['phptype']}:{$dsn['database']}"); $connection->setAttribute(PDO::ATTR_TIMEOUT, 5); $mode = defined('SQLITE_JOURNAL_MODE') ? SQLITE_JOURNAL_MODE : 'WAL'; $connection->query("PRAGMA journal_mode=$mode"); @@ -65,7 +65,7 @@ class Database extends PDO public function executeQuery($query, $values=null) { - /*.Database_PDOStatement.*/$stmt = $this->prepare($query); + $stmt/*: Database_PDOStatement*/ = $this->prepare($query); $stmt->execute($values); $stmt->cache = $stmt->fetchAll(PDO::FETCH_ASSOC); @@ -83,7 +83,7 @@ class Database extends PDO */ public function fetchAllArray($query, $values = null) { - /*.Database_PDOStatement.*/$sth = $this->prepare($query); + $sth/*: Database_PDOStatement*/ = $this->prepare($query); $prep = $this->prepareValues($values); $sth->execute($prep); return $sth->fetchAll(PDO::FETCH_ASSOC); @@ -94,7 +94,7 @@ class Database extends PDO */ public function fetchOneArray($query, $values = null) { - /*.Database_PDOStatement.*/$sth = $this->prepare($query); + $sth/*: Database_PDOStatement*/ = $this->prepare($query); $prep = $this->prepareValues($values); $sth->execute($prep); return $sth->fetch(PDO::FETCH_ASSOC); diff --git a/src/Database/JsonInstall.php b/src/Database/JsonInstall.php index 54a7d6f..078113b 100644 --- a/src/Database/JsonInstall.php +++ b/src/Database/JsonInstall.php @@ -40,7 +40,7 @@ class Database_JsonInstall { } //Создать таблицы - function initDataBase(/*.array.*/$initActions, $dbinit_path) { + function initDataBase($initActions/*: array*/, $dbinit_path) { $pg = $this->db_manager->db->isPostgres(); if (!$pg) { $refs = []; diff --git a/src/Database/Manager.php b/src/Database/Manager.php index ec354c7..f5bdaf0 100644 --- a/src/Database/Manager.php +++ b/src/Database/Manager.php @@ -2,13 +2,13 @@ class Database_Manager { - public /*.Database.*/$db; + public $db/*: Database*/; function __construct(Database $db) { $this->db = $db; } - public function ExecuteAction(/*.array.*/$action, $db_file = "") { + public function ExecuteAction($action/*: array*/, $db_file = "") { switch($action["type"]) { case "dropTable": $this->DropTableQuery($action["table_name"], true); @@ -94,7 +94,7 @@ class Database_Manager return; } - /*.array.*/$data = $this->DumpTable($table); + $data/*: array*/ = $this->DumpTable($table); $this->db->query("ALTER TABLE ".$table." RENAME TO ".$tmp_table.";"); $table_info[$new_name] = $table_info[$old_name]; @@ -141,7 +141,7 @@ class Database_Manager $this->db->query($q); } - function getConstraintDef(/*.array.*/$c) { + function getConstraintDef($c/*: array*/) { if ($c['type'] == 'unique') { return "UNIQUE(" . implode(", ", $c['fields']) . ")"; } @@ -169,8 +169,8 @@ class Database_Manager public function DumpTable($table_name) { $pg = $this->db->isPostgres(); - /*.array.*/$result = array(); - /*.array.*/$data = $this->db->fetchAllArray("SELECT * FROM ".$table_name.";"); + $result/*: array*/ = array(); + $data/*: array*/ = $this->db->fetchAllArray("SELECT * FROM ".$table_name.";"); if (!$pg) { $table_fields = $this->TableInfo($table_name); @@ -178,7 +178,7 @@ class Database_Manager $type = strtolower($value['type']); if ($type == "boolean") { foreach ($data as &$row) { - /*.array.*/$row = $row; + $row/*: array*/ = $row; if (isset($row[$name])) { $row[$name] = boolval($row[$name]); } diff --git a/src/Database/PDOStatement.php b/src/Database/PDOStatement.php index 68c7622..0ee8e6b 100644 --- a/src/Database/PDOStatement.php +++ b/src/Database/PDOStatement.php @@ -66,7 +66,7 @@ class Database_PDOStatement extends PDOStatement implements IteratorAggregate } function getInt($name) { - return intval($this->fields[$name]); + return (int)$this->fields[$name]; } function getBlob($name) { diff --git a/src/Database/Statement.php b/src/Database/Statement.php index dbcee3a..ae42fc7 100644 --- a/src/Database/Statement.php +++ b/src/Database/Statement.php @@ -12,7 +12,7 @@ class Database_Statement protected $conn; protected $query; - function __construct($query, /*.Database.*/ $conn) { + function __construct($query, $conn/*: Database*/) { $this->query = $query; $this->conn = $conn; } @@ -41,7 +41,7 @@ class Database_Statement if ($this->limit) { $this->query .= " LIMIT {$this->limit} OFFSET {$this->offset}"; } - /*.Database_PDOStatement.*/$stmt = $this->conn->prepare($this->query); + $stmt/*: Database_PDOStatement*/ = $this->conn->prepare($this->query); foreach ($this->binds as $bind) { list($n, $value, $type) = $bind; $stmt->bindValue($n, $value, (int) $type); diff --git a/src/Database/StatementIterator.php b/src/Database/StatementIterator.php index cc2cc05..8e6c970 100644 --- a/src/Database/StatementIterator.php +++ b/src/Database/StatementIterator.php @@ -8,7 +8,7 @@ class Database_StatementIterator implements Iterator private $fetchmode; private $row_count; - public function __construct(/*.Database_PDOStatement.*/ $rs) { + public function __construct($rs/*: Database_PDOStatement*/) { $this->result = $rs; $this->row_count = $rs->getRecordCount(); } diff --git a/src/Excel/Document.php b/src/Excel/Document.php index 365dba3..4600fad 100644 --- a/src/Excel/Document.php +++ b/src/Excel/Document.php @@ -39,7 +39,7 @@ class Excel_Document { if ($type == 'Borders') { $doc->startElement('Borders'); foreach ($s as $border) { - /*.array.*/$border = $border; + $border/*: array*/ = $border; $doc->startElement('Border'); foreach ($border as $key => $value) { $doc->writeAttribute('ss:' . $key, $value); diff --git a/src/Excel/Table.php b/src/Excel/Table.php index 162c823..6bc61db 100644 --- a/src/Excel/Table.php +++ b/src/Excel/Table.php @@ -64,7 +64,7 @@ class Excel_Table if(! isset($this->rows[$x])) { $this->rows[$x] = new TableRow(); } - /*.TableRow.*/$row = $this->rows[$x]; + $row/*: TableRow*/ = $this->rows[$x]; $row->setCell($y, $value); } @@ -118,7 +118,7 @@ class Excel_Table assert(is_numeric($x) && $x > 0); assert(is_numeric($cell) && $cell > 0); - /*.TableRow.*/$row = $this->rows[$x]; + $row/*: TableRow*/ = $this->rows[$x]; $row->cells[$cell]->merge = $merge; } @@ -153,7 +153,7 @@ class Excel_Table */ function getRows() { - /*.array.*/$keys = array_keys($this->rows); + $keys/*: array*/ = array_keys($this->rows); return max($keys); } @@ -164,7 +164,7 @@ class Excel_Table */ function getRowCells(TableRow $row) { - /*.array.*/$keys = array_keys($row->cells); + $keys/*: array*/ = array_keys($row->cells); return max($keys); } @@ -202,7 +202,7 @@ class Excel_Table /** * Генерация клетки таблицы (Переработать) */ - function createCell (TableCell $ncell, XMLWriter $doc, $j, /*.any.*/$value, $setIndex) { + function createCell (TableCell $ncell, XMLWriter $doc, $j, $value/*: any*/, $setIndex) { $doc->startElement("Cell"); if ($ncell->style) { @@ -262,7 +262,7 @@ class Excel_Table $doc->writeAttribute('ss:Height', $this->rows[$i]->height); } - /*.TableRow.*/$nrow = $this->rows[$i]; + $nrow/*: TableRow*/ = $this->rows[$i]; // Флаг индикатор подстановки номера столбца $setIndex = false; for ($j = 1; $j <= $columns; $j++) { diff --git a/src/Filter/ActionAccess.php b/src/Filter/ActionAccess.php index 7d4936f..9b0b9f0 100644 --- a/src/Filter/ActionAccess.php +++ b/src/Filter/ActionAccess.php @@ -8,7 +8,7 @@ class Filter_ActionAccess public $access = array(); public $processor; - function __construct(/*.Filter_Filter.*/$processor) { + function __construct($processor/*: Filter_Filter*/) { $this->processor = $processor; } diff --git a/src/Filter/ActionLogger.php b/src/Filter/ActionLogger.php index a71d5f5..5a15641 100644 --- a/src/Filter/ActionLogger.php +++ b/src/Filter/ActionLogger.php @@ -7,7 +7,7 @@ class Filter_ActionLogger public $action; public $processor; - function __construct(/*.Filter_Filter.*/$processor) { + function __construct($processor/*: Filter_Filter*/) { $this->processor = $processor; $this->file = fopen(Shortcut::getUrl('access.log'), "a"); } diff --git a/src/Filter/Filter.php b/src/Filter/Filter.php index e5135dc..645f624 100644 --- a/src/Filter/Filter.php +++ b/src/Filter/Filter.php @@ -6,7 +6,7 @@ class Filter_Filter { public $processor; - public function __construct(/*.Controller_Action.*/$processor) + public function __construct($processor/*: Controller_Action*/) { $this->processor = $processor; } diff --git a/src/Form/Field.php b/src/Form/Field.php index bb756cb..4fdf5fd 100644 --- a/src/Form/Field.php +++ b/src/Form/Field.php @@ -38,7 +38,7 @@ class Form_Field } } - function setValue(/*.any.*/$value) + function setValue($value/*: any*/) { $this->value = $value; } diff --git a/src/Functions.php b/src/Functions.php index 3f888e7..b7b6d99 100644 --- a/src/Functions.php +++ b/src/Functions.php @@ -256,7 +256,7 @@ class Functions { return $result; } - static function _get($key, /*.any.*/$value, /*.array.*/$array) { + static function _get($key, $value/*: any*/, $array/*: array*/) { foreach ($array as $item) { if ($item[$key] == $value) return $item; } @@ -368,7 +368,7 @@ class Functions { * Преобразует ключи элементов для многомерного массива * @return mixed */ - static function hash_key ($key_name,/*. array .*/ $array) { + static function hash_key ($key_name,$array/*: array*/) { $result = array(); foreach($array as $value) { diff --git a/src/HttpRequest.php b/src/HttpRequest.php index d34accf..25890a5 100644 --- a/src/HttpRequest.php +++ b/src/HttpRequest.php @@ -55,7 +55,7 @@ class HttpRequest extends Collection implements ArrayAccess return $this->_session; } - function set($key, /*.any.*/$value) + function set($key, $value/*: any*/) { return parent::get('data')->set($key, $value); } diff --git a/src/MailAlt.php b/src/MailAlt.php index 99b296d..098d921 100644 --- a/src/MailAlt.php +++ b/src/MailAlt.php @@ -48,7 +48,7 @@ class MailAlt /** * Тема письма */ - function subject(/*.string.*/$subject) + function subject($subject/*: string*/) { $this->mailer->Subject = $subject; } diff --git a/src/Model/Factory.php b/src/Model/Factory.php index 30ceb8c..43c770f 100644 --- a/src/Model/Factory.php +++ b/src/Model/Factory.php @@ -7,7 +7,7 @@ class Model_Factory public $_registry; public $_shortcut; - public function __construct (/*.Database.*/ $db, Settings $_registry = null) + public function __construct ($db/*: Database*/, Settings $_registry = null) { $this->db = $db; $this->_registry = $_registry; diff --git a/src/Path.php b/src/Path.php index ba78789..926f1a8 100644 --- a/src/Path.php +++ b/src/Path.php @@ -158,7 +158,7 @@ class Path } // Сравнение двух путей на равентство - public function equal(/*.Path.*/ $path) + public function equal($path/*: Path*/) { if (count($this->path) == count($path->path)) { for ($i = 0; $i < count($this->path); $i++) { @@ -202,7 +202,7 @@ class Path * * @return boolean */ - public function isParent(/*.Path.*/ $path) + public function isParent($path/*: Path*/) { if (isset($this->url['host']) && isset($path->url['host']) && ($this->url['host'] != $path->url['host'])) return false; diff --git a/src/Setup.php b/src/Setup.php index 52a5a0f..6e5dfa9 100644 --- a/src/Setup.php +++ b/src/Setup.php @@ -119,7 +119,7 @@ class Setup return; } - /*.SimpleXMLElement.*/$item = $this->stack[count($this->stack) - 1]; + $item/*: SimpleXMLElement*/ = $this->stack[count($this->stack) - 1]; $root = $item->children(); foreach ($root as $node) { @@ -196,7 +196,7 @@ class Setup /** * Выполнение Списка SQL команд */ - function batchSQLZip(/*.Database.*/ $conn, $file) + function batchSQLZip($conn/*: Database*/, $file) { $stmtList = Tools_SQLStatementExtractor::extract($this->zip->getFromName($file)); foreach ($stmtList as $stmt) { @@ -204,7 +204,7 @@ class Setup } } - static function batchSQL(/*.Database.*/ $conn, $file) + static function batchSQL($conn/*: Database*/, $file) { $stmtList = Tools_SQLStatementExtractor::extractFile($file); foreach ($stmtList as $stmt) { diff --git a/src/Tools/SQLStatementExtractor.php b/src/Tools/SQLStatementExtractor.php index 739f6c7..78d2d89 100644 --- a/src/Tools/SQLStatementExtractor.php +++ b/src/Tools/SQLStatementExtractor.php @@ -111,7 +111,7 @@ class Tools_SQLStatementExtractor { if ($check === "" || $check === $string) { return true; } else { - return (strpos($string, $check) === 0) ? true : false; + return (strpos($string, $check) === 0); } } @@ -121,11 +121,11 @@ class Tools_SQLStatementExtractor { * @param string $string The string to check in (haystack). * @return boolean True if $string ends with $check, or they are equal, or $check is empty. */ - protected static function endsWith(/*.string.*/$check, $string) { + protected static function endsWith($check/*: string*/, $string) { if ($check === "" || $check === $string) { return true; } else { - return (strpos(strrev($string), strrev($check)) === 0) ? true : false; + return (strpos(strrev($string), strrev($check)) === 0); } } diff --git a/src/Tools/TemplateImage.php b/src/Tools/TemplateImage.php index 171f285..0c0f489 100644 --- a/src/Tools/TemplateImage.php +++ b/src/Tools/TemplateImage.php @@ -26,7 +26,7 @@ class Tools_TemplateImage 'miriad' => 'MyriadPro-Cond.ttf', 'miriadbd' => 'MyriadPro-BoldCond.ttf' -); + ); protected $src; protected $context = array(); @@ -35,6 +35,8 @@ class Tools_TemplateImage protected $image; protected $prepare = true; public $debug = false; + public $filename; + public $resource; function __construct ($template = false) { @@ -116,7 +118,7 @@ class Tools_TemplateImage return ""; } - function imageText($text, $value) + function imageText($text, $value/*: stdClass*/) { assert(is_string($text)); diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index c6d52f9..d01c001 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -69,7 +69,7 @@ class Validator_Validator } } - public function addRule(/*.any.*/$rule) { + public function addRule($rule/*: any*/) { if (is_array($rule)) { $this->chain = array_merge($this->chain, $rule); } else { @@ -77,7 +77,7 @@ class Validator_Validator } } - public function skip(/*.Validator_Rule_Abstract.*/$rule, /*.Collection.*/$container) // -> Rule_Abstract + public function skip($rule/*: Validator_Rule_Abstract*/, $container/*: Collection*/) // -> Rule_Abstract { if ($rule->skipEmpty()) { $data = $container->get($rule->field); diff --git a/src/View/Pages.php b/src/View/Pages.php index 736a861..704629a 100644 --- a/src/View/Pages.php +++ b/src/View/Pages.php @@ -31,7 +31,7 @@ class View_Pages * @param $onpage int количество элем на странице * @return string */ - static function getLimit(/*.number.*/$page, /*.number.*/$onpage) { + static function getLimit($page/*: number*/, $onpage/*: number*/) { if ($page <= 0) { $page = 1; } return "LIMIT $onpage OFFSET " . ($page - 1) * $onpage; } diff --git a/src/View/Top.php b/src/View/Top.php index d28fca0..75667e1 100644 --- a/src/View/Top.php +++ b/src/View/Top.php @@ -99,7 +99,7 @@ class View_Top extends View_Composite { $init = array(); foreach($s->_section as $key => $item) { - /*.View_View.*/$ss = $item; + $ss/*: View_View*/ = $item; if ($ss->codeGenerator !== null) { // функцию которая вычисляет а не результат $part = call_user_func($ss->codeGenerator, $this, $key, $value); diff --git a/src/config.php b/src/config.php index 3bbc19a..86c7dfb 100644 --- a/src/config.php +++ b/src/config.php @@ -1,6 +1,7 @@