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

ListDataObjectCommand::getParentClasses()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 5
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
4 View Code Duplication
class ListDataObjectCommand 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:dataobject';
10
11
    /**
12
     * @var string
13
     */
14
    protected $description = 'List all subclasses of DataObject';
15
16
    /**
17
     * @return string
18
     */
19
    public function getClassName()
20
    {
21
        return 'DataObject';
22
    }
23
24
    /**
25
     * @param string $className
26
     * @return array
27
     */
28
    public function getParentClasses($className)
29
    {
30
        $parentClasses = array_slice(parent::getParentClasses($className), 3, -1);
31
        return array_reverse($parentClasses);
32
    }
33
}
34