Passed
Push — master ( 1f3f4f...3dfcc2 )
by Francis
01:31
created

Account   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 9
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromObject() 0 7 1
1
<?php
2
3
namespace LiveStream\Resources;
4
5
class Account extends Resource
6
{
7
    public static function fromObject(object $object): Resource
8
    {
9
        $instance = parent::fromObject($object);
10
11
        $instance->picture = Picture::fromObject($instance->picture);
0 ignored issues
show
Bug Best Practice introduced by
The property picture does not exist on LiveStream\Resources\Resource. Since you implemented __set, consider adding a @property annotation.
Loading history...
Bug introduced by
$instance->picture of type void is incompatible with the type object expected by parameter $object of LiveStream\Resources\Resource::fromObject(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

11
        $instance->picture = Picture::fromObject(/** @scrutinizer ignore-type */ $instance->picture);
Loading history...
Bug Best Practice introduced by
The property picture does not exist on LiveStream\Resources\Resource. Since you implemented __get, consider adding a @property annotation.
Loading history...
12
        
13
        return $instance;
14
    }
15
}
16