for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Anton Tuyakhov <[email protected]>
*/
namespace tuyakhov\braintree;
class ActiveField extends \yii\widgets\ActiveField
{
* @inheritdoc
public function init()
parent::init();
$inputName = explode('_', $this->attribute);
if (count($inputName) > 1) {
$inputName[0] = $inputName[1];
}
$this->inputOptions = array_merge([
'data-braintree-name' => \yii\helpers\Inflector::underscore($inputName[0]),
'autocomplete' => 'off'
], $this->inputOptions);
public function widget($class, $config = [])
$config = array_merge(['options' => $this->inputOptions], $config);
return parent::widget($class, $config);
This check marks files that end in a newline character, i.e. an empy line.