Completed
Push — master ( 5fc8fc...78226d )
by James
03:03
created

WebProject   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 11
Bugs 0 Features 1
Metric Value
wmc 3
c 11
b 0
f 1
lcom 0
cbo 0
dl 0
loc 50
ccs 6
cts 8
cp 0.75
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getVersion() 0 4 1
getParameters() 0 1 ?
1
<?php
2
3
/**
4
 * This file is, guess what, part of WebHelper.
5
 *
6
 * (c) James <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace JamesRezo\WebHelper\WebProject;
13
14
use Symfony\Component\Process\Process;
15
16
/**
17
 * Base class for webproject classes.
18
 *
19
 * name can be either laravel, symfony, drupal, dokuwiki other webproject name
20
 *
21
 * @author james <[email protected]>
22
 */
23
abstract class WebProject implements WebProjectInterface
24
{
25
    /**
26
     * the name of a webproject.
27
     *
28
     * @var string the name of a webproject
29
     */
30
    private $name;
31
32
    /**
33
     * the version of a webproject.
34
     *
35
     * @var string the version of a webproject
36
     */
37
    private $version;
38
39
    /**
40
     * Constructor.
41
     *
42
     * @param string $name    the name of a webproject
43
     * @param string $version the version of a webproject
44
     */
45 1
    public function __construct($name, $version = '')
46
    {
47 1
        $this->name = $name;
48 1
        $this->version = $version;
49 1
    }
50
51
    /**
52
     * Gets the name of a webproject.
53
     *
54
     * @return string the name of the webproject
55
     */
56 1
    public function getName()
57
    {
58 1
        return $this->name;
59
    }
60
61
    /**
62
     * Gets the version of a webproject.
63
     *
64
     * @return string the version of the webproject
65
     */
66
    public function getVersion()
67
    {
68
        return $this->version;
69
    }
70
71
    abstract public function getParameters();
72
}
73