update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -42,11 +42,11 @@ class Debug extends Twig_Extension
*/
public function getFunctions()
{
return array(
return [
new Twig_SimpleFunction(
'debug', [$this, 'debug'], array('needs_context' => true, 'needs_environment' => true)
'debug', [$this, 'debug'], ['needs_context' => true, 'needs_environment' => true]
),
);
];
}
/**
@@ -64,7 +64,7 @@ class Debug extends Twig_Extension
$count = func_num_args();
if (2 === $count) {
$data = array();
$data = [];
foreach ($context as $key => $value) {
if (is_object($value)) {
if (method_exists($value, 'toArray')) {

View File

@@ -38,11 +38,11 @@ class Dump extends Twig_Extension
*/
public function getFunctions()
{
return array(
return [
new Twig_SimpleFunction(
'dump', [$this, 'dump'], array('is_safe' => ['html'], 'needs_context' => true, 'needs_environment' => true)
'dump', [$this, 'dump'], ['is_safe' => ['html'], 'needs_context' => true, 'needs_environment' => true]
),
);
];
}
/**
@@ -60,7 +60,7 @@ class Dump extends Twig_Extension
$count = func_num_args();
if (2 === $count) {
$data = array();
$data = [];
foreach ($context as $key => $value) {
if (is_object($value)) {
if (method_exists($value, 'toArray')) {

View File

@@ -39,14 +39,14 @@ class Stopwatch extends Twig_Extension
public function getTokenParsers()
{
return array(
return [
/*
* {% stopwatch foo %}
* Some stuff which will be recorded on the timeline
* {% endstopwatch %}
*/
new StopwatchTokenParser($this->debugbar !== null),
);
];
}
public function getDebugbar()

View File

@@ -14,7 +14,7 @@ class StopwatchNode extends \Twig_Node
$lineno = 0,
$tag = null
) {
parent::__construct(array('body' => $body, 'name' => $name, 'var' => $var), array(), $lineno, $tag);
parent::__construct(['body' => $body, 'name' => $name, 'var' => $var], [], $lineno, $tag);
}
public function compile(\Twig_Compiler $compiler)

View File

@@ -27,7 +27,7 @@ class StopwatchTokenParser extends \Twig_TokenParser
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
// {% endstopwatch %}
$body = $this->parser->subparse(array($this, 'decideStopwatchEnd'), true);
$body = $this->parser->subparse([$this, 'decideStopwatchEnd'], true);
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
if ($this->debugbarAvailable) {