Completed
Push — test-rewrite ( 382d7e...696634 )
by Laurent
01:13
created

ValidInventory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 8 1
1
<?php
2
3
namespace Inventory\Domain\UseCase;
4
5
use Inventory\Domain\Model\Article;
6
use Inventory\Domain\Model\Inventory;
7
8
final class ValidInventory
9
{
10
    public function execute(Inventory $inventory): void
11
    {
12
        $articles = $inventory->articles()->toArray();
13
14
        array_map(static function (Article $article) {
15
            $article->validStock();
16
        }, $articles);
17
    }
18
}
19