Completed
Push — master ( 86b2cd...b16d12 )
by Richard
03:26
created

App::create_dic()   B

Complexity

Conditions 2
Paths 1

Size

Total Lines 106
Code Lines 63

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 46
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 106
ccs 46
cts 47
cp 0.9787
rs 8.2857
c 0
b 0
f 0
cc 2
eloc 63
nc 1
nop 2
crap 2

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 * 
5
 * Copyright (c) 2016 Richard Klees <[email protected]>
6
 *
7
 * This software is licensed under The MIT License. You should have received 
8
 * a copy of the license along with the code.
9
 */
10
11
namespace Lechimp\Dicto\App;
12
13
use Symfony\Component\Console\Application;
14
15
/**
16
 * The App to be run from a script.
17
 */
18
class App extends Application {
19
    public function __construct() {
20
        parent::__construct();
21
        ini_set('xdebug.max_nesting_level', 200);
22
23
        $this->add(new AnalyzeCommand());
24
        $this->add(new ReportCommand());
25
    }
26
}
27