Completed
Push — master ( 453cff...c1eed9 )
by Martijn van
02:33
created

ListControllerCommand::module()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
3
4 View Code Duplication
class ListControllerCommand extends AbstractListCommand
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
5
{
6
    /**
7
     * @var string
8
     */
9
    protected $signature = 'list:controller';
10
11
    /**
12
     * @var string
13
     */
14
    protected $description = 'List all subclasses of Controller';
15
16
    public function getClassName()
17
    {
18
        return 'Controller';
19
    }
20
21
    /**
22
     * @param $className
23
     * @return array
24
     */
25
    protected function getParentClasses($className)
26
    {
27
        // removes $className and Controller => RequestHandler => ViewableData => Object
28
        $parentClasses = array_slice(parent::getParentClasses($className), 4, -1);
29
        return array_reverse($parentClasses);
30
    }
31
}
32