HtmlMegasena   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getData() 0 13 1
1
<?php
2
3
namespace LoteriaApi\Consumer\Reader;
4
5
class HtmlMegasena extends AbstractReaderHtmlLoteria
6
{
7
    public function getData()
8
    {
9
        $this->numbersNode->setNumberConcurso(0)
10
            ->setDataConcurso(1)
11
            ->setDezenasConcurso([2, 3, 4, 5, 6, 7])
12
            ->setArrecadacaoConcurso(8)
13
            ->setTotalGanhadoresConcurso(9)
14
            ->setValorAcumuladoConcurso(16);
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