Passed
Pull Request — master (#120)
by Dmitriy
14:21
created

ResetableContainer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A reset() 0 4 2
1
<?php
2
3
namespace Yiisoft\Di;
4
5
final class ResetableContainer extends Container implements ResetableContainerInterface
6
{
7
    public function reset(): void
8
    {
9
        foreach ($this->instances as $service => $instance) {
10
            unset($this->instances[$service]);
11
        }
12
    }
13
}
14