AbstractPrototype   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPrototype() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author  : Jagepard <[email protected]>
7
 * @license https://mit-license.org/ MIT
8
 */
9
10
namespace Creational\Prototype;
11
12
abstract class AbstractPrototype
13
{
14
    public static int $count = 0;
15
16
    abstract public function __clone();
17
18
    /**
19
     * Gets the prototype
20
     * ------------------
21
     * Получает прототип
22
     *
23
     * @return AbstractPrototype
24
     */
25
    public function getPrototype(): AbstractPrototype
26
    {
27
        return clone $this;
28
    }
29
}
30