Completed
Pull Request — master (#189)
by
unknown
05:16
created

GetStatsResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 28
ccs 0
cts 9
cp 0
rs 10
c 1
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
     * @return null
19
     */
20
    public function getMainStats()
21
    {
22
        return $this->mainStats;
23
    }
24
25
    /**
26
     * @param $stats
27
     * @return $this
28
     */
29
    public function setMainStats($mainStats)
30
    {
31
        $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...
32
        return $this;
33
    }
34
}
35