Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| StockOutputReturnToStartedService | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| processOutputReturnToStarted | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Domain\StockIO\Services; |
| 4 | |
| 5 | use App\Models\StockIO\StockIO; |
| 6 | use Domain\StockIO\Enums\StockStatusEnum; |
| 7 | |
| 8 | readonly 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 | } |