Update to latest php-cs-fixer config.
Update to corresponding style-ci config options. Fix a few code style issues in the process.
This commit is contained in:
@@ -6,10 +6,21 @@ use Symfony\CS\FixerInterface;
|
|||||||
$config = Config::create()
|
$config = Config::create()
|
||||||
// use symfony level and extra fixers:
|
// use symfony level and extra fixers:
|
||||||
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
|
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
|
||||||
->fixers(array('align_double_arrow', '-concat_without_spaces', 'concat_with_spaces', 'ordered_use', 'strict'))
|
->fixers(array(
|
||||||
|
'-concat_without_spaces',
|
||||||
|
'-pre_increment',
|
||||||
|
'-unalign_double_arrow',
|
||||||
|
'-unalign_equals',
|
||||||
|
'align_double_arrow',
|
||||||
|
'concat_with_spaces',
|
||||||
|
'ordered_use',
|
||||||
|
'strict',
|
||||||
|
))
|
||||||
->setUsingLinter(false);
|
->setUsingLinter(false);
|
||||||
|
|
||||||
$finder = $config->getFinder()
|
$finder = $config->getFinder()
|
||||||
->in(__DIR__);
|
->in('bin')
|
||||||
|
->in('src')
|
||||||
|
->in('test');
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
|||||||
@@ -8,3 +8,6 @@ enabled:
|
|||||||
|
|
||||||
disabled:
|
disabled:
|
||||||
- concat_without_spaces
|
- concat_without_spaces
|
||||||
|
- pre_increment
|
||||||
|
- unalign_double_arrow
|
||||||
|
- unalign_equals
|
||||||
|
|||||||
+3
-10
@@ -34,7 +34,6 @@ define('EXAMPLE_PATH', realpath(dirname(__FILE__) . '/../test/fixtures/examples'
|
|||||||
* AStringMore -> a_string_more
|
* AStringMore -> a_string_more
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @access public
|
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -56,7 +55,6 @@ function getLowerCaseName($name)
|
|||||||
* a_string_more -> AStringMore -> a_string_more
|
* a_string_more -> AStringMore -> a_string_more
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @access public
|
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -72,7 +70,6 @@ function getUpperCaseName($name)
|
|||||||
* return the given value and echo it out appending "\n".
|
* return the given value and echo it out appending "\n".
|
||||||
*
|
*
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @access public
|
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
@@ -91,9 +88,8 @@ function out($value)
|
|||||||
* the returned filename will be echoed out.
|
* the returned filename will be echoed out.
|
||||||
*
|
*
|
||||||
* @param string $directory directory without / at the end
|
* @param string $directory directory without / at the end
|
||||||
* @param string $filename filename without path and extension
|
* @param string $filename filename without path and extension
|
||||||
* @param string $extension extension of the file without "."
|
* @param string $extension extension of the file without "."
|
||||||
* @access public
|
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -109,7 +105,6 @@ function buildPath($directory, $filename = null, $extension = null)
|
|||||||
* the script die()'s if mkdir() fails.
|
* the script die()'s if mkdir() fails.
|
||||||
*
|
*
|
||||||
* @param string $directory
|
* @param string $directory
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
function createDirectory($directory)
|
function createDirectory($directory)
|
||||||
{
|
{
|
||||||
@@ -124,10 +119,9 @@ function createDirectory($directory)
|
|||||||
* the script die()'s if fopen() fails.
|
* the script die()'s if fopen() fails.
|
||||||
*
|
*
|
||||||
* @param string $directory directory without / at the end
|
* @param string $directory directory without / at the end
|
||||||
* @param string $filename filename without path and extension
|
* @param string $filename filename without path and extension
|
||||||
* @param string $extension extension of the file without "."
|
* @param string $extension extension of the file without "."
|
||||||
* @param string $content the content of the file
|
* @param string $content the content of the file
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
function createFile($directory, $filename, $extension, $content = '')
|
function createFile($directory, $filename, $extension, $content = '')
|
||||||
{
|
{
|
||||||
@@ -150,7 +144,6 @@ function createFile($directory, $filename, $extension, $content = '')
|
|||||||
* examples/some_thing/SomeThing.php
|
* examples/some_thing/SomeThing.php
|
||||||
*
|
*
|
||||||
* @param mixed $example_name
|
* @param mixed $example_name
|
||||||
* @access public
|
|
||||||
*/
|
*/
|
||||||
function main($example_name)
|
function main($example_name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -317,8 +317,8 @@ class Mustache_Test_EngineTest extends Mustache_Test_FunctionalTestCase
|
|||||||
list($name, $mustache) = $this->getLoggedMustache(Mustache_Logger::DEBUG);
|
list($name, $mustache) = $this->getLoggedMustache(Mustache_Logger::DEBUG);
|
||||||
$mustache->render('{{ foo }}{{> bar }}', array('foo' => 'FOO'));
|
$mustache->render('{{ foo }}{{> bar }}', array('foo' => 'FOO'));
|
||||||
$log = file_get_contents($name);
|
$log = file_get_contents($name);
|
||||||
$this->assertContains('DEBUG: Instantiating template: ', $log);
|
$this->assertContains('DEBUG: Instantiating template: ', $log);
|
||||||
$this->assertContains("WARNING: Partial not found: \"bar\"", $log);
|
$this->assertContains('WARNING: Partial not found: "bar"', $log);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user