$this->moveCursor(substr($this->code, $this->cursor, $pos - $this->cursor) . $this->options['tag_comment'][1]);
- // mimicks the behavior of PHP by removing the newline that follows instructions if present
+ // mimics the behavior of PHP by removing the newline that follows instructions if present
if ("\n" === substr($this->code, $this->cursor, 1)) {
++$this->cursor;
++$this->lineno;
$this->moveCursor($match[0]);
$this->state = self::STATE_DATA;
- // mimicks the behavior of PHP by removing the newline that follows instructions if present
+ // mimics the behavior of PHP by removing the newline that follows instructions if present
if ("\n" === substr($this->code, $this->cursor, 1)) {
++$this->cursor;
++$this->lineno;
/**
* Loads a template from an array.
*
- * When using this loader with a cache mehcanism, you should know that a new cache
+ * When using this loader with a cache mechanism, you should know that a new cache
* key is generated each time a template content "changes" (the cache key being the
* source code of the template). If you don't want to see your cache grows out of
* control, you need to take care of clearing the old cache file by yourself.
// constants are marked safe for all
$this->setSafe($node, array('all'));
} elseif ($node instanceof Twig_Node_Expression_Conditional) {
- // instersect safeness of both operands
+ // intersect safeness of both operands
$safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3')));
$this->setSafe($node, $safe);
} elseif ($node instanceof Twig_Node_Expression_Filter) {
*
* @param integer $type The type of the token
* @param string $value The token value
- * @param integer $lineno The line positionl in the source
+ * @param integer $lineno The line position in the source
*/
public function __construct($type, $value, $lineno)
{
function getTokenParser($tag);
/**
- * Calls Twig_TokenParserInterface::setParser on all parsers the implementation knowns of.
+ * Calls Twig_TokenParserInterface::setParser on all parsers the implementation knows of.
*
* @param Twig_ParserInterface $parser A Twig_ParserInterface interface
*/