many phpcs fixes

This commit is contained in:
AlexGx
2014-03-05 00:22:55 +02:00
parent a94b2778b0
commit 1982efbdfe
117 changed files with 282 additions and 241 deletions

View File

@@ -68,7 +68,8 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface
* @param string $name file name
* @return string absolute path of file
*/
protected function getFilePath($name){
protected function getFilePath($name)
{
return $this->_dir . '/' . $name;
}
}
}

View File

@@ -33,33 +33,33 @@ class ViewRenderer extends BaseViewRenderer
* @see http://twig.sensiolabs.org/doc/api.html#environment-options
*/
public $options = [];
/**
/**
* @var array Objects or static classes.
* Keys of the array are names to call in template, values are objects or names of static classes.
* Example: `['html' => '\yii\helpers\Html']`.
* In the template you can use it like this: `{{ html.a('Login', 'site/login') | raw }}`.
*/
public $globals = [];
/**
public $globals = [];
/**
* @var array Custom functions.
* Keys of the array are names to call in template, values are names of functions or static methods of some class.
* Example: `['rot13' => 'str_rot13', 'a' => '\yii\helpers\Html::a']`.
* In the template you can use it like this: `{{ rot13('test') }}` or `{{ a('Login', 'site/login') | raw }}`.
*/
public $functions = [];
/**
public $functions = [];
/**
* @var array Custom filters.
* Keys of the array are names to call in template, values are names of functions or static methods of some class.
* Example: `['rot13' => 'str_rot13', 'jsonEncode' => '\yii\helpers\Json::encode']`.
* In the template you can use it like this: `{{ 'test'|rot13 }}` or `{{ model|jsonEncode }}`.
*/
public $filters = [];
/**
public $filters = [];
/**
* @var array Custom extensions.
* Example: `['Twig_Extension_Sandbox', 'Twig_Extension_Text']`
*/
public $extensions = [];
/**
public $extensions = [];
/**
* @var array Twig lexer options.
* Example: Smarty-like syntax:
* ```php
@@ -71,8 +71,8 @@ class ViewRenderer extends BaseViewRenderer
* ```
* @see http://twig.sensiolabs.org/doc/recipes.html#customizing-the-syntax
*/
public $lexerOptions = [];
/**
public $lexerOptions = [];
/**
* @var \Twig_Environment twig environment object that do all rendering twig templates
*/
public $twig;
@@ -118,7 +118,7 @@ class ViewRenderer extends BaseViewRenderer
}
// Adding global 'void' function (usage: {{void(App.clientScript.registerScriptFile(...))}})
$this->twig->addFunction('void', new \Twig_Function_Function(function($argument){
$this->twig->addFunction('void', new \Twig_Function_Function(function ($argument) {
}));
$this->twig->addFunction('path', new \Twig_Function_Function(function ($path, $args = []) {

View File

@@ -19,7 +19,8 @@ class ViewRendererStaticClassProxy
{
private $_staticClassName;
public function __construct($staticClassName) {
public function __construct($staticClassName)
{
$this->_staticClassName = $staticClassName;
}
@@ -40,4 +41,4 @@ class ViewRendererStaticClassProxy
{
return call_user_func_array(array($this->_staticClassName, $method), $arguments);
}
}
}