Completed
Push — master ( 46e3e5...5d6747 )
by Marco
03:29
created

AbstractCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 14
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 8 1
1
<?php namespace Comodojo\Foundation\Console;
2
3
use \Comodojo\Foundation\Base\Configuration;
4
use \Comodojo\Foundation\Base\ConfigurationTrait;
5
use \Symfony\Component\Console\Command\Command;
6
7
/**
8
 * @package     Comodojo Foundation
9
 * @author      Marco Giovinazzi <[email protected]>
10
 * @license     MIT
11
 *
12
 * LICENSE:
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
 * THE SOFTWARE.
21
 */
22
23
abstract class AbstractCommand extends Command {
24
25
    use ConfigurationTrait;
26
27
    static public function init(Configuration $configuration) {
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
28
29
        $me = get_called_class();
30
        $myself = new $me();
31
32
        return $myself->setConfiguration($configuration);
33
34
    }
35
36
}
37