Completed
Push — master ( 8c3306...57acb7 )
by Martijn van
02:51
created

MakeCommandCommand::buildClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
4
class MakeCommandCommand extends MakeCommand
0 ignored issues
show
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 $name = 'make:command';
10
11
    /**
12
     * @var string
13
     */
14
    protected $description = 'Create a new Command class';
15
16
    protected function buildClass($class)
17
    {
18
        $content = parent::buildClass($class);
19
20
        $content = str_replace('CommandName', strtolower($this->getNameInput()), $content);
21
22
        return $content;
23
    }
24
}
25