Skip to content

Commit

Permalink
Fix Scrutinizer CS violations
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Dec 28, 2015
1 parent d797bce commit 7ab9b9c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/View/Helper/CrudViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
use Cake\View\Helper;
use Cake\View\Helper\FormHelper;

/**
* @property \Cake\View\Helper\FormHelper $Form
* @property \Cake\View\Helper\HtmlHelper $Html
* @property \Cake\View\Helper\TimeHelper $Time
*/
class CrudViewHelper extends Helper
{

Expand All @@ -16,7 +21,7 @@ class CrudViewHelper extends Helper
*
* @var array
*/
public $helpers = ['Form', 'Html', 'Time', 'Paginator'];
public $helpers = ['Form', 'Html', 'Time'];

/**
* Context
Expand Down Expand Up @@ -67,7 +72,7 @@ public function process($field, Entity $data, array $options = [])
}

if ($options['formatter'] === 'relation') {
$relation = $this->relation($field, $value, $options);
$relation = $this->relation($field);
if ($relation) {
return $relation['output'];
}
Expand Down Expand Up @@ -112,8 +117,7 @@ public function fieldValue(Entity $data = null, $field = null)
*/
public function introspect($field, $value, array $options = [])
{
$output = $this->relation($field, $value, $options);

$output = $this->relation($field);
if ($output) {
return $output['output'];
}
Expand All @@ -138,7 +142,7 @@ public function introspect($field, $value, array $options = [])
return $this->formatTime($field, $value, $options);
}

$value = $this->formatString($field, $value, $options);
$value = $this->formatString($field, $value);

if ($field === $this->getViewVar('displayField')) {
$value = $this->createViewLink($value, ['escape' => false]);
Expand Down

0 comments on commit 7ab9b9c

Please sign in to comment.