/**
* Registers Twig_Autoloader as an SPL autoloader.
*
- * @param Boolean $prepend Whether to prepend the autoloader or not.
+ * @param bool $prepend Whether to prepend the autoloader or not.
*/
public static function register($prepend = false)
{
* Compiles a node.
*
* @param Twig_NodeInterface $node The node to compile
- * @param integer $indentation The current indentation
+ * @param int $indentation The current indentation
*
* @return Twig_Compiler The current compiler instance
*/
/**
* Indents the generated code.
*
- * @param integer $step The number of indentation to add
+ * @param int $step The number of indentation to add
*
* @return Twig_Compiler The current compiler instance
*/
/**
* Outdents the generated code.
*
- * @param integer $step The number of indentation to remove
+ * @param int $step The number of indentation to remove
*
* @return Twig_Compiler The current compiler instance
*
/**
* Checks if debug mode is enabled.
*
- * @return Boolean true if debug mode is enabled, false otherwise
+ * @return bool true if debug mode is enabled, false otherwise
*/
public function isDebug()
{
/**
* Checks if the auto_reload option is enabled.
*
- * @return Boolean true if auto_reload is enabled, false otherwise
+ * @return bool true if auto_reload is enabled, false otherwise
*/
public function isAutoReload()
{
/**
* Checks if the strict_variables option is enabled.
*
- * @return Boolean true if strict_variables is enabled, false otherwise
+ * @return bool true if strict_variables is enabled, false otherwise
*/
public function isStrictVariables()
{
* Gets the template class associated with the given string.
*
* @param string $name The name for which to calculate the template class name
- * @param integer $index The index if it is an embedded template
+ * @param int $index The index if it is an embedded template
*
* @return string The template class name
*/
* Loads a template by name.
*
* @param string $name The template name
- * @param integer $index The index if it is an embedded template
+ * @param int $index The index if it is an embedded template
*
* @return Twig_TemplateInterface A template instance representing the given template name
*
* @param string $name The template name
* @param timestamp $time The last modification time of the cached template
*
- * @return Boolean true if the template is fresh, false otherwise
+ * @return bool true if the template is fresh, false otherwise
*/
public function isTemplateFresh($name, $time)
{
*
* @param string $name The extension name
*
- * @return Boolean Whether the extension is registered or not
+ * @return bool Whether the extension is registered or not
*/
public function hasExtension($name)
{
* By default, automatic guessing is enabled.
*
* @param string $message The error message
- * @param integer $lineno The template line where the error occurred
+ * @param int $lineno The template line where the error occurred
* @param string $filename The template file name where the error occurred
* @param Exception $previous The previous exception
*/
/**
* Gets the template line where the error occurred.
*
- * @return integer The template line
+ * @return int The template line
*/
public function getTemplateLine()
{
/**
* Sets the template line where the error occurred.
*
- * @param integer $lineno The template line
+ * @param int $lineno The template line
*/
public function setTemplateLine($lineno)
{
*
* @param string $name The name of the template to check if we can load
*
- * @return Boolean If the template source code is handled by this loader or not
+ * @return bool If the template source code is handled by this loader or not
*/
public function exists($name);
}
/**
* Parses arguments.
*
- * @param Boolean $namedArguments Whether to allow named arguments or not
- * @param Boolean $definition Whether we are parsing arguments for a function definition
+ * @param bool $namedArguments Whether to allow named arguments or not
+ * @param bool $definition Whether we are parsing arguments for a function definition
*/
public function parseArguments($namedArguments = false, $definition = false)
{
/**
* Sets the default format to be used by the number_format filter.
*
- * @param integer $decimal The number of decimal places to use.
+ * @param int $decimal The number of decimal places to use.
* @param string $decimalPoint The character(s) to use for the decimal point.
* @param string $thousandSep The character(s) to use for the thousands separator.
*/
* Cycles over a value.
*
* @param ArrayAccess|array $values An array or an ArrayAccess instance
- * @param integer $position The cycle position
+ * @param int $position The cycle position
*
* @return string The next value in the cycle
*/
* - a random integer between 0 and the integer parameter
*
* @param Twig_Environment $env A Twig_Environment instance
- * @param Traversable|array|integer|string $values The values to pick a random item from
+ * @param Traversable|array|int|string $values The values to pick a random item from
*
* @throws Twig_Error_Runtime When $values is an empty array (does not apply to an empty string which is returned as is).
*
/**
* Rounds a number.
*
- * @param integer|float $value The value to round
- * @param integer|float $precision The rounding precision
+ * @param int|float $value The value to round
+ * @param int|float $precision The rounding precision
* @param string $method The method to use for rounding
*
- * @return integer|float The rounded number
+ * @return int|float The rounded number
*/
function twig_round($value, $precision = 0, $method = 'common')
{
*
* @param Twig_Environment $env A Twig_Environment instance
* @param mixed $number A float/int/string of the number to format
- * @param integer $decimal The number of decimal points to display.
+ * @param int $decimal The number of decimal points to display.
* @param string $decimalPoint The character(s) to use for the decimal point.
* @param string $thousandSep The character(s) to use for the thousands separator.
*
* URL encodes a string as a path segment or an array as a query string.
*
* @param string|array $url A URL or an array of query parameters
- * @param Boolean $raw true to use rawurlencode() instead of urlencode
+ * @param bool $raw true to use rawurlencode() instead of urlencode
*
* @return string The URL encoded value
*/
* JSON encodes a variable.
*
* @param mixed $value The value to encode.
- * @param integer $options Not used on PHP 5.2.x
+ * @param int $options Not used on PHP 5.2.x
*
* @return mixed The JSON encoded value
*/
* JSON encodes a variable.
*
* @param mixed $value The value to encode.
- * @param integer $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT
+ * @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT
*
* @return mixed The JSON encoded value
*/
*
* @param Twig_Environment $env A Twig_Environment instance
* @param mixed $item A variable
- * @param integer $start Start of the slice
- * @param integer $length Size of the slice
- * @param Boolean $preserveKeys Whether to preserve key or not (when the input is an array)
+ * @param int $start Start of the slice
+ * @param int $length Size of the slice
+ * @param bool $preserveKeys Whether to preserve key or not (when the input is an array)
*
* @return mixed The sliced variable
*/
*
* @param string $value A string
* @param string $delimiter The delimiter
- * @param integer $limit The limit
+ * @param int $limit The limit
*
* @return array The split string as an array
*/
*
* @param Twig_Environment $env A Twig_Environment instance
* @param array|Traversable|string $item An array, a Traversable instance, or a string
- * @param Boolean $preserveKeys Whether to preserve key or not
+ * @param bool $preserveKeys Whether to preserve key or not
*
* @return mixed The reversed input
*/
* @param string $string The value to be escaped
* @param string $strategy The escaping strategy
* @param string $charset The charset
- * @param Boolean $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
+ * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
*/
function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
{
* @param Twig_Environment $env A Twig_Environment instance
* @param mixed $thing A variable
*
- * @return integer The length of the value
+ * @return int The length of the value
*/
function twig_length_filter(Twig_Environment $env, $thing)
{
* @param Twig_Environment $env A Twig_Environment instance
* @param mixed $thing A variable
*
- * @return integer The length of the value
+ * @return int The length of the value
*/
function twig_length_filter(Twig_Environment $env, $thing)
{
*
* @param mixed $value A variable
*
- * @return Boolean true if the value is empty, false otherwise
+ * @return bool true if the value is empty, false otherwise
*/
function twig_test_empty($value)
{
*
* @param mixed $value A variable
*
- * @return Boolean true if the value is traversable
+ * @return bool true if the value is traversable
*/
function twig_test_iterable($value)
{
*
* @param string|array $template The template to render or an array of templates to try consecutively
* @param array $variables The variables to pass to the template
- * @param Boolean $with_context Whether to pass the current context variables or not
- * @param Boolean $ignore_missing Whether to ignore missing templates or not
- * @param Boolean $sandboxed Whether to sandbox the template or not
+ * @param bool $with_context Whether to pass the current context variables or not
+ * @param bool $ignore_missing Whether to ignore missing templates or not
+ * @param bool $sandboxed Whether to sandbox the template or not
*
* @return string The rendered template
*/
* Batches item.
*
* @param array $items An array of items
- * @param integer $size The size of the batch
+ * @param int $size The size of the batch
* @param mixed $fill A value used to fill missing items
*
* @return array
* @param string $name The template name
* @param timestamp $time The last modification time of the cached template
*
- * @return Boolean true if the template is fresh, false otherwise
+ * @return bool true if the template is fresh, false otherwise
*
* @throws Twig_Error_Loader When $name is not found
*/
*
* @param array $nodes An array of named nodes
* @param array $attributes An array of attributes (should not be nodes)
- * @param integer $lineno The line number
+ * @param int $lineno The line number
* @param string $tag The tag name associated with the Node
*/
public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null)
*
* @param string The attribute name
*
- * @return Boolean true if the attribute is defined, false otherwise
+ * @return bool true if the attribute is defined, false otherwise
*/
public function hasAttribute($name)
{
*
* @param string The node name
*
- * @return Boolean true if the node with the given name exists, false otherwise
+ * @return bool true if the node with the given name exists, false otherwise
*/
public function hasNode($name)
{
{
public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null)
{
- parent::__construct(array('expr' => $expr, 'variables' => $variables), array('only' => (Boolean) $only, 'ignore_missing' => (Boolean) $ignoreMissing), $lineno, $tag);
+ parent::__construct(array('expr' => $expr, 'variables' => $variables), array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag);
}
/**
/**
* Constructor.
*
- * @param integer $optimizers The optimizer mode
+ * @param int $optimizers The optimizer mode
*/
public function __construct($optimizers = -1)
{
*
* Priority should be between -10 and 10 (0 is the default).
*
- * @return integer The priority level
+ * @return int The priority level
*/
public function getPriority();
}
* @param string $name The block name to display
* @param array $context The context
* @param array $blocks The current set of blocks
- * @param Boolean $useBlocks Whether to use the current set of blocks
+ * @param bool $useBlocks Whether to use the current set of blocks
*/
public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true)
{
* @param string $name The block name to render
* @param array $context The context
* @param array $blocks The current set of blocks
- * @param Boolean $useBlocks Whether to use the current set of blocks
+ * @param bool $useBlocks Whether to use the current set of blocks
*
* @return string The rendered block
*/
*
* @param string $name The block name
*
- * @return Boolean true if the block exists, false otherwise
+ * @return bool true if the block exists, false otherwise
*/
public function hasBlock($name)
{
*
* @param array $context The context
* @param string $item The variable to return from the context
- * @param Boolean $ignoreStrictCheck Whether to ignore the strict variable check or not
+ * @param bool $ignoreStrictCheck Whether to ignore the strict variable check or not
*
* @return The content of the context variable
*
* @param mixed $item The item to get from the array or object
* @param array $arguments An array of arguments to pass if the item is an object method
* @param string $type The type of attribute (@see Twig_Template constants)
- * @param Boolean $isDefinedTest Whether this is only a defined check
- * @param Boolean $ignoreStrictCheck Whether to ignore the strict attribute check or not
+ * @param bool $isDefinedTest Whether this is only a defined check
+ * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not
*
* @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
*
/**
* Constructor.
*
- * @param integer $type The type of the token
+ * @param int $type The type of the token
* @param string $value The token value
- * @param integer $lineno The line position in the source
+ * @param int $lineno The line position in the source
*/
public function __construct($type, $value, $lineno)
{
* * type and value (or array of possible values)
* * just value (or array of possible values) (NAME_TYPE is used as type)
*
- * @param array|integer $type The type to test
+ * @param array|int $type The type to test
* @param array|string|null $values The token value
*
- * @return Boolean
+ * @return bool
*/
public function test($type, $values = null)
{
/**
* Gets the line.
*
- * @return integer The source line
+ * @return int The source line
*/
public function getLine()
{
/**
* Gets the token type.
*
- * @return integer The token type
+ * @return int The token type
*/
public function getType()
{
/**
* Returns the constant representation (internal) of a given type.
*
- * @param integer $type The type as an integer
- * @param Boolean $short Whether to return a short representation or not
+ * @param int $type The type as an integer
+ * @param bool $short Whether to return a short representation or not
*
* @return string The string representation
*/
/**
* Returns the english representation of a given type.
*
- * @param integer $type The type as an integer
+ * @param int $type The type as an integer
*
* @return string The string representation
*/
/**
* Looks at the next token.
*
- * @param integer $number
+ * @param int $number
*
* @return Twig_Token
*/
/**
* Tests the current token
*
- * @return Boolean
+ * @return bool
*/
public function test($primary, $secondary = null)
{
/**
* Checks if end of stream was reached
*
- * @return Boolean
+ * @return bool
*/
public function isEOF()
{