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

BParameterGridController::afterAction()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 10
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
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.modules.product.controllers
8
 */
9
class BParameterGridController extends BController
10
{
11
  public $showInMenu = false;
12
13
  public $name = 'Параметры (grid)';
14
15
  public $modelClass = 'BProductParam';
16
17
  public function afterAction($action)
18
  {
19
    parent::afterAction($action);
20
21
    if( in_array($action->id, array('toggle')) )
22
    {
23
      $model = BProductParam::model()->findByPk(Yii::app()->request->getParam('id'));
24
      BProduct::model()->findByPk($model->product_id)->save();
25
    }
26
  }
27
}