Issues (2551)

Impl/ProcessApplicationReferenceImpl.php (1 issue)

Severity
1
<?php
2
3
namespace Jabe\Application\Impl;
4
5
use Jabe\ProcessEngineInterface;
6
use Jabe\Application\{
7
    AbstractProcessApplication,
8
    ProcessApplicationReferenceInterface
9
};
10
11
class ProcessApplicationReferenceImpl implements ProcessApplicationReferenceInterface
12
{
13
    //private static ProcessApplicationLogger LOG = ProcessEngineLogger.PROCESS_APPLICATION_LOGGER;
14
15
    /** reference to the process application */
16
    protected $processApplication;
17
18
    protected $name;
19
20
    public function __construct(AbstractProcessApplication $processApplication)
21
    {
22
        $this->processApplication = $processApplication;
23
        $this->name = $processApplication->getName();
24
    }
25
26
    public function getName(): string
27
    {
28
        return $this->name;
29
    }
30
31
    public function getProcessApplication(): ?AbstractProcessApplication
32
    {
33
        $application = $this->processApplication->get();
34
        if ($application === null) {
35
            //throw LOG.processApplicationUnavailableException(name);
36
        } else {
37
            return $application;
38
        }
39
    }
40
41
    public function processEngineStopping(ProcessEngineInterface $processEngine): void
0 ignored issues
show
The parameter $processEngine is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

41
    public function processEngineStopping(/** @scrutinizer ignore-unused */ ProcessEngineInterface $processEngine): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
42
    {
43
      // do nothing
44
    }
45
46
    public function clear(): void
47
    {
48
        $this->processApplication->clear();
49
    }
50
}
51