WebProject::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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