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

ValidInventory::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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