Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
StockOutputReturnToStartedService
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 processOutputReturnToStarted
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace Domain\StockIO\Services;
4
5use App\Models\StockIO\StockIO;
6use Domain\StockIO\Enums\StockStatusEnum;
7
8readonly class StockOutputReturnToStartedService
9{
10    public function processOutputReturnToStarted(StockIO $output): void
11    {
12        $output->setAttribute('status', StockStatusEnum::STARTED->value);
13        $output->setAttribute('end_date', null);
14        $output->save();
15    }
16}