WebProject   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

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

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
/**
15
 * Base class for webproject classes.
16
 *
17
 * name can be either laravel, symfony, drupal, dokuwiki other webproject name
18
 *
19
 * @author james <[email protected]>
20
 */
21
abstract class WebProject implements WebProjectInterface
22
{
23
    /**
24
     * the name of a webproject.
25
     *
26
     * @var string the name of a webproject
27
     */
28
    private $name;
29
30
    /**
31
     * the version of a webproject.
32
     *
33
     * @var string the version of a webproject
34
     */
35
    private $version;
36
37
    /**
38
     * Constructor.
39
     *
40
     * @param string $name    the name of a webproject
41
     * @param string $version the version of a webproject
42
     */
43 2
    public function __construct($name, $version = '')
44
    {
45 2
        $this->name = $name;
46 2
        $this->version = $version;
47 2
    }
48
49
    /**
50
     * Gets the name of a webproject.
51
     *
52
     * @return string the name of the webproject
53
     */
54 2
    public function getName()
55
    {
56 2
        return $this->name;
57
    }
58
59
    /**
60
     * Gets the version of a webproject.
61
     *
62
     * @return string the version of the webproject
63
     */
64
    public function getVersion()
65
    {
66
        return $this->version;
67
    }
68
69
    abstract public function getParameters();
70
}
71