Completed
Push — develop ( c6a956...40134e )
by Steven
9s
created

Project   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 3
c 3
b 0
f 2
lcom 0
cbo 2
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 11 3
1
<?php namespace Magestead\Installers;
2
3
/**
4
 * Class Project
5
 * @package Magestead\Installers
6
 */
7
class Project
8
{
9
    /**
10
     * @param array $options
11
     * @param array $config
12
     * @param $projectPath
13
     * @param $output
14
     * @return Magento2Project|MagentoProject
15
     */
16
    public static function create(array $options, array $config, $projectPath, $output)
17
    {
18
        switch ($options['app']) {
19
            case "magento":
20
                return new MagentoProject($options, $config, $projectPath, $output);
21
            break;
0 ignored issues
show
Unused Code introduced by
break is not strictly necessary here and could be removed.

The break statement is not necessary if it is preceded for example by a return statement:

switch ($x) {
    case 1:
        return 'foo';
        break; // This break is not necessary and can be left off.
}

If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.

Loading history...
22
            case "magento2":
23
                return new Magento2Project($options, $config, $projectPath, $output);
24
            break;
0 ignored issues
show
Unused Code introduced by
break is not strictly necessary here and could be removed.

The break statement is not necessary if it is preceded for example by a return statement:

switch ($x) {
    case 1:
        return 'foo';
        break; // This break is not necessary and can be left off.
}

If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.

Loading history...
25
        }
26
    }
27
}