for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Anton Tuyakhov <[email protected]>
*/
namespace tuyakhov\braintree;
use Yii;
class ActiveForm extends \yii\widgets\ActiveForm
{
* @inheritdoc
public function init()
parent::init();
$id = $this->options['id'];
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.
$clientSideKey = Yii::$app->get('braintree')->clientSideKey;
$view = $this->getView();
BraintreeAsset::register($view);
$view->registerJs("braintree.setup('$clientSideKey', 'custom', {id: '$id'});");
$this->fieldClass = ActiveField::className();
}