HtmlLotomania::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace LoteriaApi\Consumer\Reader;
4
5
class HtmlLotomania extends AbstractReaderHtmlLoteria
6
{
7
    public function getData()
8
    {
9
        $this->numbersNode->setNumberConcurso(0)
10
            ->setDataConcurso(1)
11
            ->setDezenasConcurso([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21])
12
            ->setArrecadacaoConcurso(22)
13
            ->setTotalGanhadoresConcurso(23)
14
            ->setValorAcumuladoConcurso(35);
15
16
        parent::loadData($this->numbersNode);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (loadData() instead of getData()). Are you sure this is correct? If so, you might want to change this to $this->loadData().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
17
18
        return $this->data;
19
    }
20
}
21