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.

PaymentController::actionResult()   A
last analyzed

Complexity

Conditions 2
Paths 3

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 3
nop 0
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
/**
3
 * @author Sergey Glagolev <[email protected]>
4
 * @link https://github.com/shogodev/argilla/
5
 * @copyright Copyright &copy; 2003-2013 Shogo
6
 * @license http://argilla.ru/LICENSE
7
 * @package frontend.controllers
8
 */
9
class PaymentController extends FController
10
{
11
  public function filters()
12
  {
13
    return array(
14
      'postOnly + check, result, capture',
15
    );
16
  }
17
18
  public function actionCheck()
19
  {
20
    try
21
    {
22
      $paymentSystem = new PlatronSystem();
23
      $paymentSystem->processCheckPayment();
24
    }
25
    catch(CException $exception)
0 ignored issues
show
Bug introduced by
The class CException does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
26
    {
27
      throw new CHttpException(404, $exception->getMessage());
28
    }
29
  }
30
31
  public function actionResult()
32
  {
33
    try
34
    {
35
      $paymentSystem = new PlatronSystem();
36
      $paymentSystem->processResultPayment();
37
    }
38
    catch(CException $exception)
0 ignored issues
show
Bug introduced by
The class CException does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
39
    {
40
      throw new CHttpException(404, $exception->getMessage());
41
    }
42
  }
43
44
  public function actionCapture()
45
  {
46
    try
47
    {
48
      $paymentSystem = new PlatronSystem();
49
      $paymentSystem->processCapturePayment();
50
    }
51
    catch(CException $exception)
0 ignored issues
show
Bug introduced by
The class CException does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
52
    {
53
      throw new CHttpException(404, $exception->getMessage());
54
    }
55
  }
56
57
  public function actionSuccess()
58
  {
59
    $this->breadcrumbs = array(
60
      'Оплата успешно произведена',
61
    );
62
63
    try
64
    {
65
      $paymentSystem = new PlatronSystem();
66
      $paymentSystem->successPaymentResult();
67
    }
68
    catch(CException $exception)
0 ignored issues
show
Bug introduced by
The class CException does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
69
    {
70
      throw new CHttpException(404, $exception->getMessage());
71
    }
72
73
    $this->render('success', array(
74
      'order' => Order::model()->findByPk($paymentSystem->getOrderId()),
75
    ));
76
  }
77
78
  public function actionFailure()
79
  {
80
    $this->breadcrumbs = array(
81
      'Оплата не произведена',
82
    );
83
84
    try
85
    {
86
      $paymentSystem = new PlatronSystem();
87
      $error = $paymentSystem->failurePaymentResult();
88
    }
89
    catch(CException $exception)
0 ignored issues
show
Bug introduced by
The class CException does not exist. Did you forget a USE statement, or did you not list all dependencies?

Scrutinizer analyzes your composer.json/composer.lock file if available to determine the classes, and functions that are defined by your dependencies.

It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.

Loading history...
90
    {
91
      throw new CHttpException(404, $exception->getMessage());
92
    }
93
94
    $this->render('failure', array(
95
      'order' => Order::model()->findByPk($paymentSystem->getOrderId()),
96
      'textBlock' => strtr(
97
        $this->textBlockRegister('Оплата не произведена', 'Оплата не произведена.', array('class' => 'success-message bb center red')),
98
        array('{error}' => $error)
99
      ),
100
    ));
101
  }
102
103
  protected function beforeAction($action)
104
  {
105
    Yii::app()->log->getRoutes()[1]->enabled = false;
106
    return parent::beforeAction($action);
107
  }
108
}