Profitability::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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