Consume   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A consume() 0 7 2
A __construct() 0 3 1
1
<?php
2
namespace src\preguntas;
3
4
class Consume
5
{
6
    /**
7
     *
8
     * @var PreguntaUno
9
     */
10
    private PreguntaUno $_consume;
11
12
    /**
13
     *
14
     * @param PreguntaUno $preguntaUno
15
     */
16 11
    public function __construct(PreguntaUno $preguntaUno)
17
    {
18 11
        $this->_consume = $preguntaUno;
19 11
    }
20
21
    /**
22
     *
23
     * @return boolean
24
     */
25 11
    public function consume(): bool
26
    {
27 11
        if ($this->_consume->numero() == '1') {
28 11
            return true;
29
        }
30
31 11
        return false;
32
    }
33
}
34