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

AbstractPrototype   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPrototype() 0 3 1
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