Completed
Pull Request — master (#189)
by
unknown
15:27 queued 07:46
created

GetStatsResponse::getMainStats()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Yandex\Market\Partner\Models;
4
5
use Yandex\Common\Model;
6
7
class GetStatsResponse extends Model
8
{
9
    protected $mainStats = null;
10
11
    protected $mappingClasses = [
12
        'mainStats' => 'Yandex\Market\Partner\Models\Stats'
13
    ];
14
15
    protected $propNameMap = [];
16
17
18
    /**
19
     * @return null
20
     */
21
    public function getMainStats()
22
    {
23
        return $this->mainStats;
24
    }
25
26
    /**
27
     * @param $stats
28
     * @return $this
29
     */
30
    public function setMainStats($mainStats)
31
    {
32
        $this->stats = $mainStats;
0 ignored issues
show
Bug introduced by
The property stats does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
33
        return $this;
34
    }
35
36
}