Completed
Push — master ( 0c8b52...630886 )
by Korotkov
07:30
created

AbstractPrototype::getPrototype()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author    : Korotkov Danila <[email protected]>
7
 * @license   https://mit-license.org/ MIT
8
 */
9
10
namespace Creational\Prototype;
11
12
/**
13
 * Class AbstractPrototype
14
 * @package Creational\Prototype
15
 */
16
abstract class AbstractPrototype
17
{
18
19
    /**
20
     * @var int
21
     */
22
    public static $count = 0;
23
24
    abstract public function __clone();
25
26
    /**
27
     * @return mixed
28
     */
29
    public function getPrototype(): AbstractPrototype
30
    {
31
        return clone $this;
32
    }
33
}
34