Completed
Push — master ( 48a5d3...028360 )
by Aydin
03:14
created

BabySteps::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
11
/**
12
 * Class BabySteps
13
 * @package PhpSchool\LearnYouPhp\Exercise
14
 * @author Aydin Hassan <[email protected]>
15
 */
16
class BabySteps extends AbstractExercise implements ExerciseInterface, CliExercise
17
{
18
19
    /**
20
     * @return string
21
     */
22
    public function getName()
23
    {
24
        return 'Baby Steps';
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getDescription()
31
    {
32
        return 'Simple Addition';
33
    }
34
35
    /**
36
     * @return array
37
     */
38
    public function getArgs()
39
    {
40
        $numArgs = rand(0, 10);
41
42
        $args = [];
43
        for ($i = 0; $i < $numArgs; $i ++) {
44
            $args[] = rand(0, 100);
45
        }
46
47
        return $args;
48
    }
49
50
    /**
51
     * @return ExerciseType
52
     */
53
    public function getType()
54
    {
55
        return ExerciseType::CLI();
56
    }
57
}
58