Passed
Pull Request — master (#2)
by Riikka
02:22
created

AbstractEntryProvider::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Simply\Container;
4
5
/**
6
 * Abstract entry provider that provides the most basic provider initialization functionality.
7
 *
8
 * @author Riikka Kalliomäki <[email protected]>
9
 * @copyright Copyright (c) 2018 Riikka Kalliomäki
10
 * @license http://opensource.org/licenses/mit-license.php MIT License
11
 */
12
abstract class AbstractEntryProvider implements EntryProvider
13
{
14
    /**
15
     * Returns a new instance of the entry provider.
16
     * @return EntryProvider New entry provider instance initialized with default constructor
17
     */
18 2
    public static function initialize(): EntryProvider
19
    {
20 2
        return new static();
21
    }
22
}
23