Passed
Pull Request — master (#20)
by
unknown
01:59
created

ClanBadge::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace PoLaKoSz\CoC_API\Models
4
{
5
    use PoLaKoSz\CoC_API\Models\Image;
6
    use PoLaKoSz\CoC_API\Models\Url;
7
8 View Code Duplication
    class ClanBadge extends Image
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
    {
10
        /**
11
         * @var Url Large size image's url
12
         */
13
        public $large;
14
15
        /**
16
         * @param stdClass
17
         */
18
        public function __construct($stdClass)
19
        {
20
            $this->small  = new Url($stdClass->small);
21
            $this->medium = new Url($stdClass->medium);
22
            $this->large  = new Url($stdClass->large);
23
        }
24
    }
25
}