for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class Controller extends CController
{
public $layout='//layouts/column1';
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
$a = "a"; $ab = "ab"; $abc = "abc";
will produce issues in the first and second line, while this second example
will produce no issues.
public $menu=array();
public $breadcrumbs=array();
public $contentClass;
public function beforeRender($view)
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');
$cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery.countdown.min.js', CClientScript::POS_HEAD);
$cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/fish.js', CClientScript::POS_HEAD);
$cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/jquery.mobile-1.3.2.min.js', CClientScript::POS_HEAD);
$cs->registerScript(
'vars',
'var justAdvanced = ' . (Yii::app()->player->model->justAdvanced?'true':'false') . ';
var refillTime = ' . Yii::app()->player->model->remainingTimeToRefill . ';
var rpi = ' . Yii::app()->player->model->refillPerInterval . '; ',
CClientScript::POS_HEAD
);
//CSS
$cs->registerCssFile(Yii::app()->request->baseUrl . '/css/themes/brown.css');
$cs->registerCssFile(Yii::app()->request->baseUrl . '/css/jquery.mobile.structure-1.3.2.min.css');
$cs->registerCssFile(Yii::app()->request->baseUrl . '/css/game.css?4');
return true;
}
This check marks files that end in a newline character, i.e. an empy line.
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.