HelloWorld   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 35
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getDescription() 0 4 1
A getArgs() 0 4 1
A getType() 0 4 1
1
<?php
2
3
namespace PhpSchool\LearnYouPhp\Exercise;
4
5
use PhpSchool\PhpWorkshop\Exercise\AbstractExercise;
6
use PhpSchool\PhpWorkshop\Exercise\CliExercise;
7
use PhpSchool\PhpWorkshop\Exercise\ExerciseInterface;
8
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
9
use PhpSchool\PhpWorkshop\ExerciseCheck\StdOutExerciseCheck;
10
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
11
12
/**
13
 * Class HelloWorld
14
 * @package PhpSchool\LearnYouPhp\Exercise
15
 * @author Aydin Hassan <[email protected]>
16
 */
17
class HelloWorld extends AbstractExercise implements ExerciseInterface, CliExercise
18
{
19
20
    /**
21
     * @return string
22
     */
23
    public function getName()
24
    {
25
        return 'Hello World';
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getDescription()
32
    {
33
        return 'Simple Hello World exercise';
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    public function getArgs()
40
    {
41
        return [];
42
    }
43
44
    /**
45
     * @return ExerciseType
46
     */
47
    public function getType()
48
    {
49
        return ExerciseType::CLI();
50
    }
51
}
52