Profitability   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 24
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A save() 0 4 1
1
<?php
2
3
namespace JulianoBailao\DomusApi\Endpoints;
4
5
use JulianoBailao\DomusApi\Core\Endpoint;
6
use JulianoBailao\DomusApi\Data\ProfitabilityData;
7
8
class Profitability extends Endpoint
9
{
10
    /**
11
     * Create a new profitability data.
12
     *
13
     * @return ProfitabilityData
14
     */
15 3
    public function create()
16
    {
17 3
        return new ProfitabilityData($this);
18
    }
19
20
    /**
21
     * Send the profitability Request.
22
     *
23
     * @param int $id the product line id.
0 ignored issues
show
Bug introduced by
There is no parameter named $id. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
24
     *
25
     * @return stdObject
26
     */
27 3
    public function save()
28
    {
29 3
        return $this->run('POST', 'pedidovenda-rest/lucratividade');
30
    }
31
}
32