IndexAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 15 1
1
<?php
2
3
/**
4
 *  _   __ __ _____ _____ ___  ____  _____
5
 * | | / // // ___//_  _//   ||  __||_   _|
6
 * | |/ // /(__  )  / / / /| || |     | |
7
 * |___//_//____/  /_/ /_/ |_||_|     |_|
8
 * @link https://vistart.me/
9
 * @copyright Copyright (c) 2016 - 2017 vistart
10
 * @license https://vistart.me/license/
11
 */
12
13
namespace rhosocial\organization\web\organization\controllers\my;
14
15
use rhosocial\organization\Organization;
16
use rhosocial\user\User;
17
use Yii;
18
use yii\base\Action;
19
20
/**
21
 * @version 1.0
22
 * @author vistart <[email protected]>
23
 */
24
class IndexAction extends Action
25
{
26
    /**
27
     * 
28
     * @param string $orgOnly
0 ignored issues
show
Bug introduced by
There is no parameter named $orgOnly. 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...
29
     * @return string rendering result.
30
     */
31
    public function run()
32
    {
33
        $user = Yii::$app->user->identity;
34
        /* @var $user User */
35
        $noInitOrg = $user->getNoInitOrganization();
36
        /* @var $noInitOrg Organization */
37
        $searchModel = $noInitOrg->getSearchModel();
38
        $searchModel->query = $searchModel->query->andWhere([$searchModel->memberUserAlias . '.guid' => $user->getGUID()]);
39
        $dataProvider = $searchModel->search(Yii::$app->request->get());
40
        return $this->controller->render('index', [
41
            'dataProvider' => $dataProvider,
42
            'searchModel' => $searchModel,
43
            'user' => $user,
44
        ]);
45
    }
46
}
47