- correction of PHPDoc blocks

- minor code cleanup
This commit is contained in:
Uwe Tews
2017-10-26 10:25:41 +02:00
parent 812758225c
commit dd9c076dfa
76 changed files with 613 additions and 141 deletions
@@ -1,10 +1,19 @@
<?php
/**
* Class TP_yyToken
*/
class TP_yyToken implements ArrayAccess
{
public $string = '';
public $metadata = array();
/**
* TP_yyToken constructor.
*
* @param $s
* @param array $m
*/
public function __construct($s, $m = array())
{
if ($s instanceof TP_yyToken) {
@@ -20,21 +29,38 @@ class TP_yyToken implements ArrayAccess
}
}
/**
* @return string
*/
public function __toString()
{
return $this->string;
}
/**
* @param mixed $offset
*
* @return bool
*/
public function offsetExists($offset)
{
return isset($this->metadata[ $offset ]);
}
/**
* @param mixed $offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return $this->metadata[ $offset ];
}
/**
* @param mixed $offset
* @param mixed $value
*/
public function offsetSet($offset, $value)
{
if ($offset === null) {
@@ -58,12 +84,18 @@ class TP_yyToken implements ArrayAccess
}
}
/**
* @param mixed $offset
*/
public function offsetUnset($offset)
{
unset($this->metadata[ $offset ]);
}
}
/**
* Class TP_yyStackEntry
*/
class TP_yyStackEntry
{
public $stateno; /* The state-number */
@@ -1727,6 +1759,10 @@ class Smarty_Internal_Templateparser
$this->security = isset($this->smarty->security_policy) ? $this->smarty->security_policy : false;
$this->current_buffer = $this->root_buffer = new Smarty_Internal_ParseTree_Template();
} /* The parser's stack */
/**
* @param $yymajor
* @param $yypminor
*/
public static function yy_destructor($yymajor, $yypminor)
{
switch ($yymajor) {
@@ -1777,6 +1813,10 @@ class Smarty_Internal_Templateparser
return new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode($tmp, true));
}
/**
* @param $TraceFILE
* @param $zTracePrompt
*/
public function Trace($TraceFILE, $zTracePrompt)
{
if (!$TraceFILE) {
@@ -1794,6 +1834,11 @@ class Smarty_Internal_Templateparser
$this->yyTracePrompt = '<br>';
}
/**
* @param $tokenType
*
* @return mixed|string
*/
public function tokenName($tokenType)
{
if ($tokenType === 0) {
@@ -1833,6 +1878,11 @@ class Smarty_Internal_Templateparser
}
}
/**
* @param $token
*
* @return array|mixed
*/
public function yy_get_expected_tokens($token)
{
static $res3 = array();
@@ -1917,6 +1967,11 @@ class Smarty_Internal_Templateparser
return array_unique($expected);
}
/**
* @param $token
*
* @return bool
*/
public function yy_is_expected_token($token)
{
static $res = array();
@@ -2006,6 +2061,11 @@ class Smarty_Internal_Templateparser
return true;
}
/**
* @param $iLookAhead
*
* @return int|mixed
*/
public function yy_find_shift_action($iLookAhead)
{
$stateno = $this->yystack[ $this->yyidx ]->stateno;
@@ -2040,6 +2100,12 @@ class Smarty_Internal_Templateparser
}
}
/**
* @param $stateno
* @param $iLookAhead
*
* @return int|mixed
*/
public function yy_find_reduce_action($stateno, $iLookAhead)
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
@@ -2063,6 +2129,14 @@ class Smarty_Internal_Templateparser
}
#line 234 "../smarty/lexer/smarty_internal_templateparser.y"
/**
* @param $yyNewState
* @param $yyMajor
* @param $yypMinor
*
* @throws \SmartyCompilerException
*/
public function yy_shift($yyNewState, $yyMajor, $yypMinor)
{
$this->yyidx++;
@@ -3356,6 +3430,11 @@ class Smarty_Internal_Templateparser
$this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor);
}
/**
* @param $yyruleno
*
* @throws \SmartyCompilerException
*/
public function yy_reduce($yyruleno)
{
if ($this->yyTraceFILE && $yyruleno >= 0
@@ -3407,6 +3486,12 @@ class Smarty_Internal_Templateparser
}
}
/**
* @param $yymajor
* @param $TOKEN
*
* @throws \SmartyCompilerException
*/
public function yy_syntax_error($yymajor, $TOKEN)
{
#line 214 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -3429,6 +3514,12 @@ class Smarty_Internal_Templateparser
$this->retvalue = $this->_retvalue;
}
/**
* @param $yymajor
* @param $yytokenvalue
*
* @throws \SmartyCompilerException
*/
public function doParse($yymajor, $yytokenvalue)
{
$yyerrorhit = 0; /* True if yymajor has invoked an error */