Passed
Push — master ( 1b6422...319c57 )
by Henri
03:06
created

Helper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInstance() 0 4 2
1
<?php
2
3
namespace HnrAzevedo\Validator;
4
5
trait Helper
6
{
7
    protected static Validator $instance;
8
    
9
    private static function getInstance(): Validator
10
    {
11
        self::$instance = (isset(self::$instance)) ? self::$instance : new Validator();
12
        return self::$instance;
13
    }
14
15
}
16