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

GetStatsResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMainStats() 0 4 1
A setMainStats() 0 5 1
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
}