Постфиксная запись типов вместо префиксной

This commit is contained in:
CORP\phedor 2018-05-04 14:57:52 +03:00
parent 04662a94df
commit 11370eecc9
33 changed files with 95 additions and 79 deletions

View file

@ -10,7 +10,7 @@ class Page extends View
{
private $counter;
public $text;
public /*.SiteInterface.*/$site;
public $site/*: SiteInterface*/;
function __construct($data, $site)
{
@ -55,7 +55,7 @@ class Page extends View
function replaceContent($match, $offset)
{
/*.Component.*/$component = $this->site->loadComponent($match);
$component/*: Component*/ = $this->site->loadComponent($match);
$req = new HttpRequest();
unset($req['active_page']);

View file

@ -33,7 +33,7 @@ class 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;
}

View file

@ -102,7 +102,7 @@ class Top extends Composite {
$init = array();
foreach($s->_section as $key => $item) {
/*.View.*/$ss = $item;
$ss/*: View*/ = $item;
if ($ss->codeGenerator !== null) {
// функцию которая вычисляет а не результат
$part = call_user_func($ss->codeGenerator, $this, $key, $value);