ProcessCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 0
c 1
b 1
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Flawlol\FacadeIdeHelper\Service;
4
5
use Flawlol\FacadeIdeHelper\Interface\FacadeHelperGeneratorInterface;
6
use Flawlol\FacadeIdeHelper\Interface\ProcessInterface;
7
8
/**
9
 * Class ProcessCommand.
10
 *
11
 * This class implements the ProcessInterface and is responsible for invoking the facade helper generation process.
12
 *
13
 * @author Flawlol - Norbert Kecső
14
 */
15
final class ProcessCommand implements ProcessInterface
16
{
17
    /**
18
     * ProcessCommand constructor.
19
     *
20
     * @param FacadeHelperGeneratorInterface $facadeHelperGenerator The facade helper generator interface.
21
     */
22
    public function __construct(private FacadeHelperGeneratorInterface $facadeHelperGenerator)
23
    {
24
    }
25
26
    /**
27
     * Invoke the process.
28
     *
29
     * This method calls the generate method on the facade helper generator to create the facade helper file.
30
     */
31
    public function __invoke(): void
32
    {
33
        $this->facadeHelperGenerator->generate();
34
    }
35
}
36