CS fixes.
Plus add config for StyleCI.
This commit is contained in:
@@ -6,7 +6,7 @@ use Symfony\CS\FixerInterface;
|
||||
$config = Config::create()
|
||||
// use symfony level and extra fixers:
|
||||
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
|
||||
->fixers(array('-concat_without_spaces', 'concat_with_spaces', 'strict'))
|
||||
->fixers(array('align_double_arrow', '-concat_without_spaces', 'concat_with_spaces', 'ordered_use', 'strict'))
|
||||
->setUsingLinter(false);
|
||||
|
||||
$finder = $config->getFinder()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
preset: symfony
|
||||
|
||||
enabled:
|
||||
- align_double_arrow
|
||||
- concat_with_spaces
|
||||
- ordered_use
|
||||
- strict
|
||||
|
||||
disabled:
|
||||
- concat_without_spaces
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/**
|
||||
* A shell script to create a single-file class cache of the entire Mustache
|
||||
* library:
|
||||
* library.
|
||||
*
|
||||
* $ bin/build_bootstrap.php
|
||||
*
|
||||
@@ -72,7 +72,6 @@ SymfonyClassCollectionLoader::load(array(
|
||||
* the unnecessary bits removed.
|
||||
*
|
||||
* @license http://www.opensource.org/licenses/MIT
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class SymfonyClassCollectionLoader
|
||||
|
||||
+19
-10
@@ -2,7 +2,7 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* A commandline script to create an example and the needed files:
|
||||
* A commandline script to create an example and the needed files.
|
||||
*
|
||||
* $ bin/create_example.php my_new_example
|
||||
*
|
||||
@@ -26,6 +26,7 @@ define('EXAMPLE_PATH', realpath(dirname(__FILE__) . '/../test/fixtures/examples'
|
||||
|
||||
/**
|
||||
* transform a string to lowercase using underlines.
|
||||
*
|
||||
* Examples:
|
||||
* String -> string
|
||||
* AString -> a_string
|
||||
@@ -34,6 +35,7 @@ define('EXAMPLE_PATH', realpath(dirname(__FILE__) . '/../test/fixtures/examples'
|
||||
*
|
||||
* @param string $name
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getLowerCaseName($name)
|
||||
@@ -45,7 +47,8 @@ function getLowerCaseName($name)
|
||||
}
|
||||
|
||||
/**
|
||||
* transform a string to Uppercase (camelcase)
|
||||
* transform a string to Uppercase (camelcase).
|
||||
*
|
||||
* Examples
|
||||
* string -> String
|
||||
* a_string -> AString
|
||||
@@ -54,6 +57,7 @@ function getLowerCaseName($name)
|
||||
*
|
||||
* @param string $name
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function getUpperCaseName($name)
|
||||
@@ -65,10 +69,11 @@ 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
|
||||
* @access public
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function out($value)
|
||||
@@ -79,15 +84,17 @@ function out($value)
|
||||
}
|
||||
|
||||
/**
|
||||
* create Path for certain files in an example
|
||||
* create Path for certain files in an example.
|
||||
*
|
||||
* returns the directory name if only $directory is given.
|
||||
* if an extension is given a complete filename is returned.
|
||||
* the returned filename will be echoed out
|
||||
* the returned filename will be echoed out.
|
||||
*
|
||||
* @param string $directory directory without / at the end
|
||||
* @param string $filename filename without path and extension
|
||||
* @param string $extension extension of the file without "."
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function buildPath($directory, $filename = null, $extension = null)
|
||||
@@ -97,8 +104,9 @@ function buildPath($directory, $filename = null, $extension = null)
|
||||
}
|
||||
|
||||
/**
|
||||
* creates the directory for the example
|
||||
* the script die()'s if mkdir() fails
|
||||
* creates the directory for the example.
|
||||
*
|
||||
* the script die()'s if mkdir() fails.
|
||||
*
|
||||
* @param string $directory
|
||||
* @access public
|
||||
@@ -111,8 +119,9 @@ function createDirectory($directory)
|
||||
}
|
||||
|
||||
/**
|
||||
* create a file for the example with the given $content
|
||||
* the script die()'s if fopen() fails
|
||||
* create a file for the example with the given $content.
|
||||
*
|
||||
* the script die()'s if fopen() fails.
|
||||
*
|
||||
* @param string $directory directory without / at the end
|
||||
* @param string $filename filename without path and extension
|
||||
@@ -132,7 +141,7 @@ function createFile($directory, $filename, $extension, $content = "")
|
||||
}
|
||||
|
||||
/**
|
||||
* routine to create the example directory and 3 files
|
||||
* routine to create the example directory and 3 files.
|
||||
*
|
||||
* if the $example_name is "SomeThing" the following files will be created
|
||||
* examples/some_thing
|
||||
|
||||
@@ -56,7 +56,7 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache and load the compiled class
|
||||
* Cache and load the compiled class.
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
@@ -89,7 +89,7 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache
|
||||
}
|
||||
|
||||
/**
|
||||
* Create cache directory
|
||||
* Create cache directory.
|
||||
*
|
||||
* @throws Mustache_Exception_RuntimeException If unable to create directory
|
||||
*
|
||||
@@ -117,7 +117,7 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache
|
||||
}
|
||||
|
||||
/**
|
||||
* Write cache file
|
||||
* Write cache file.
|
||||
*
|
||||
* @throws Mustache_Exception_RuntimeException If unable to write file
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ class Mustache_Loader_CascadingLoader implements Mustache_Loader
|
||||
private $loaders;
|
||||
|
||||
/**
|
||||
* Construct a CascadingLoader with an array of loaders:
|
||||
* Construct a CascadingLoader with an array of loaders.
|
||||
*
|
||||
* $loader = new Mustache_Loader_CascadingLoader(array(
|
||||
* new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__),
|
||||
|
||||
@@ -55,6 +55,7 @@ class Mustache_Loader_InlineLoader implements Mustache_Loader
|
||||
|
||||
/**
|
||||
* The InlineLoader requires a filename and offset to process templates.
|
||||
*
|
||||
* The magic constants `__FILE__` and `__COMPILER_HALT_OFFSET__` are usually
|
||||
* perfectly suited to the job:
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Describes a Mustache logger instance
|
||||
* Describes a Mustache logger instance.
|
||||
*
|
||||
* This is identical to the Psr\Log\LoggerInterface.
|
||||
*
|
||||
@@ -29,7 +29,7 @@
|
||||
interface Mustache_Logger
|
||||
{
|
||||
/**
|
||||
* Psr\Log compatible log levels
|
||||
* Psr\Log compatible log levels.
|
||||
*/
|
||||
const EMERGENCY = 'emergency';
|
||||
const ALERT = 'alert';
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class Mustache_Template
|
||||
}
|
||||
|
||||
/**
|
||||
* Mustache Template instances can be treated as a function and rendered by simply calling them:
|
||||
* Mustache Template instances can be treated as a function and rendered by simply calling them.
|
||||
*
|
||||
* $m = new Mustache_Engine;
|
||||
* $tpl = $m->loadTemplate('Hello, {{ name }}!');
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* A PHPUnit test case wrapping the Mustache Spec
|
||||
* A PHPUnit test case wrapping the Mustache Spec.
|
||||
*
|
||||
* @group mustache-spec
|
||||
* @group functional
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* A PHPUnit test case wrapping the Mustache Spec
|
||||
* A PHPUnit test case wrapping the Mustache Spec.
|
||||
*
|
||||
* @group mustache-spec
|
||||
* @group functional
|
||||
|
||||
Reference in New Issue
Block a user