GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 1ba1f4...ea41a5 )
by Alexey
05:37
created

BDataColumn::renderFilterDivContent()   C

Complexity

Conditions 8
Paths 5

Size

Total Lines 33
Code Lines 18

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 33
rs 5.3846
cc 8
eloc 18
nc 5
nop 0
1
<?php
2
/**
3
 * @author Sergey Glagolev <[email protected]>
4
 * @link https://github.com/shogodev/argilla/
5
 * @copyright Copyright &copy; 2003-2014 Shogo
6
 * @license http://argilla.ru/LICENSE
7
 * @package backend.widgets.grid
8
 */
9
Yii::import('bootstrap.widgets.TbDataColumn');
10
11
class BDataColumn extends TbDataColumn
12
{
13
  /**
14
   * @var bool $hideColumn дает возможность скрыть столбец, но оставить его в фильтре
15
   */
16
  public $hideColumn;
17
18
  public function renderFilterCell()
19
  {
20
    if( $this->grid->filterPosition !== BGridView::FILTER_POS_SEPARATE )
21
      parent::renderFilterCell();
22
    else
23
      $this->renderFilterDivContent();
24
  }
25
26
  public function renderDataCell($row)
27
  {
28
    if( $this->hideColumn )
29
      return;
30
31
    parent::renderDataCell($row);
32
  }
33
34
  public function renderHeaderCell()
35
  {
36
    if( $this->hideColumn )
37
      return;
38
39
    parent::renderHeaderCell();
40
  }
41
42
  public function renderFooterCell()
43
  {
44
    if( $this->hideColumn )
45
      return;
46
47
    parent::renderFooterCell();
48
  }
49
50
  protected function renderFilterDivContent()
51
  {
52
    if( is_string($this->filter) )
53
      echo $this->filter;
54
    else if( $this->filter !== false && $this->grid->filter !== null && $this->name !== null && strpos($this->name, '.') === false )
55
    {
56
      echo CHtml::activeLabel($this->grid->filter, $this->name, array('id' => false, 'label' => $this->header));
57
58
      if( is_array($this->filter) )
59
      {
60
        $htmlOptions = CMap::mergeArray(
61
          array(
62
            'id' => false,
63
            'prompt' => ''
64
          ),
65
          $this->htmlOptions
66
        );
67
68
        echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, $htmlOptions);
69
      }
70
      else if( $this->filter === null )
71
      {
72
        $htmlOptions = CMap::mergeArray(
73
          array(
74
            'id' => false,
75
          ),
76
          $this->htmlOptions
77
        );
78
79
        echo CHtml::activeTextField($this->grid->filter, $this->name, $htmlOptions);
80
      }
81
    }
82
  }
83
}