Various style cleanups.

* a bunch of small changes, courtesy of styleci
 * update dates in file headers
 * add file headers to files that are missing them
This commit is contained in:
Justin Hileman
2016-07-30 17:57:19 -07:00
parent 41edfcb9e2
commit 01777faf6e
100 changed files with 477 additions and 123 deletions
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Mustache_Test_Cache_AbstractCacheTest extends PHPUnit_Framework_TestCase
{
public function testGetSetLogger()
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group functional
*/
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Mustache_Test_Exception_SyntaxExceptionTest extends PHPUnit_Framework_TestCase
{
public function testInstance()
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Mustache_Test_Exception_UnknownFilterExceptionTest extends PHPUnit_Framework_TestCase
{
public function testInstance()
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Mustache_Test_Exception_UnknownHelperExceptionTest extends PHPUnit_Framework_TestCase
{
public function testInstance()
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Mustache_Test_Exception_UnknownTemplateExceptionTest extends PHPUnit_Framework_TestCase
{
public function testInstance()
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group lambdas
* @group functional
@@ -25,6 +26,8 @@ class Mustache_Test_FiveThree_Functional_ClosureQuirksTest extends PHPUnit_Frame
public function testClosuresDontLikeItWhenYouTouchTheirProperties()
{
$tpl = $this->mustache->loadTemplate('{{ foo.bar }}');
$this->assertEquals('', $tpl->render(array('foo' => function () { return 'FOO'; })));
$this->assertEquals('', $tpl->render(array('foo' => function () {
return 'FOO';
})));
}
}
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group pragmas
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group filters
* @group functional
@@ -35,11 +36,11 @@ class Mustache_Test_FiveThree_Functional_FiltersTest extends PHPUnit_Framework_T
{
$helpers = array(
'longdate' => function (\DateTime $value) {
return $value->format('Y-m-d h:m:s');
},
return $value->format('Y-m-d h:m:s');
},
'echo' => function ($value) {
return array($value, $value, $value);
},
return array($value, $value, $value);
},
);
return array(
@@ -143,21 +144,45 @@ EOS;
array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO')),
array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO', 'bar' => 'BAR')),
array('{{% FILTERS }}{{ foo | bar }}', array('foo' => 'FOO', 'bar' => array(1, 2))),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; })),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { return 'BAZ'; })),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () { return 'BAR'; })),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () { return 'BAZ'; })),
array('{{% FILTERS }}{{ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; }, 'baz' => function () { return 'BAZ'; })),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () {
return 'BAR';
})),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () {
return 'BAZ';
})),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('bar' => function () {
return 'BAR';
})),
array('{{% FILTERS }}{{ foo | bar | baz }}', array('baz' => function () {
return 'BAZ';
})),
array('{{% FILTERS }}{{ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () {
return 'BAR';
}, 'baz' => function () {
return 'BAZ';
})),
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array()),
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO')),
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO', 'bar' => 'BAR')),
array('{{% FILTERS }}{{# foo | bar }}{{ . }}{{/ foo | bar }}', array('foo' => 'FOO', 'bar' => array(1, 2))),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; })),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () { return 'BAZ'; })),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () { return 'BAR'; })),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () { return 'BAZ'; })),
array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () { return 'BAR'; }, 'baz' => function () { return 'BAZ'; })),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'bar' => function () {
return 'BAR';
})),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('foo' => 'FOO', 'baz' => function () {
return 'BAZ';
})),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('bar' => function () {
return 'BAR';
})),
array('{{% FILTERS }}{{# foo | bar | baz }}{{ . }}{{/ foo | bar | baz }}', array('baz' => function () {
return 'BAZ';
})),
array('{{% FILTERS }}{{# foo | bar.baz }}{{ . }}{{/ foo | bar.baz }}', array('foo' => 'FOO', 'bar' => function () {
return 'BAR';
}, 'baz' => function () {
return 'BAZ';
})),
);
}
}
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group lambdas
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group lambdas
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* A PHPUnit test case wrapping the Mustache Spec.
*
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group lambdas
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group lambdas
* @group functional
@@ -52,7 +53,9 @@ class Mustache_Test_FiveThree_Functional_StrictCallablesTest extends PHPUnit_Fra
),
array(
false,
function () { return 'Yoshi'; },
function () {
return 'Yoshi';
},
$lambda,
'YOSHI',
),
@@ -80,7 +83,9 @@ class Mustache_Test_FiveThree_Functional_StrictCallablesTest extends PHPUnit_Fra
// Strict interpolation lambdas
array(
true,
function () { return 'Yoshi'; },
function () {
return 'Yoshi';
},
$lambda,
'YOSHI',
),
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group magic_methods
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group examples
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group lambdas
* @group functional
@@ -1,5 +1,14 @@
<?php
/*
* This file is part of Mustache.php.
*
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group inheritance
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group mustache_injection
* @group functional
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* A PHPUnit test case wrapping the Mustache Spec.
*
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group functional
* @group partials
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group sections
* @group functional
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
abstract class Mustache_Test_FunctionalTestCase extends PHPUnit_Framework_TestCase
{
protected static $tempDir;
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Mustache_Test_HelperCollectionTest extends PHPUnit_Framework_TestCase
{
public function testConstructor()
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
abstract class Mustache_Test_SpecTestCase extends PHPUnit_Framework_TestCase
{
protected static $mustache;
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/
+2 -1
View File
@@ -3,12 +3,13 @@
/*
* This file is part of Mustache.php.
*
* (c) 2010-2015 Justin Hileman
* (c) 2010-2016 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @group unit
*/