Failed Conditions
Push — master ( dc6c53...ed3b11 )
by Maximo
01:10 queued 11s
created

PaymentMethodsCredsController::onConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas\Api\Controllers;
6
7
use Canvas\Models\PaymentMethodsCreds;
8
use Phalcon\Http\Response;
9
10
/**
11
 * Class LanguagesController.
12
 *
13
 * @package Canvas\Api\Controllers
14
 *
15
 */
16
class PaymentMethodsCredsController extends BaseController
17
{
18
    /*
19
     * fields we accept to create
20
     *
21
     * @var array
22
     */
23
    protected $createFields = [];
24
25
    /*
26
     * fields we accept to create
27
     *
28
     * @var array
29
     */
30
    protected $updateFields = [];
31
32
    /**
33
     * set objects.
34
     *
35
     * @return void
36
     */
37
    public function onConstruct()
38
    {
39
        $this->model = new PaymentMethodsCreds();
40
        $this->additionalSearchFields = [
41
            ['is_deleted', ':', '0'],
42
            ['users_id', ':', $this->userData->getId()],
43
            ['companies_id', ':', '0|' . $this->userData->currentCompanyId()],
44
            ['apps_id', ':', $this->app->getId()]
45
        ];
46
    }
47
48
    /**
49
     * Get current payment methods creds
50
     *
51
     * @param mixed $id
0 ignored issues
show
Bug introduced by
There is no parameter named $id. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
52
     *
53
     * @method GET
54
     * @url /v1/roles-acceslist/{id}
55
     *
56
     * @return Response
57
     */
58
    public function getCurrentPaymentMethodsCreds(): Response
59
    {
60
        return $this->response($this->model->getCurrentPaymentMethodCreds());
61
    }
62
63
64
}
65