Issues (2551)

src/Impl/Context/ExecutionContext.php (1 issue)

1
<?php
2
3
namespace Jabe\Impl\Context;
4
5
use Jabe\Impl\Persistence\Entity\{
6
    ExecutionEntity,
7
    ProcessDefinitionEntity
8
};
9
10
class ExecutionContext extends CoreExecutionContext
11
{
12
    public function __construct(ExecutionEntity $execution)
13
    {
14
        parent::__construct($execution);
15
    }
16
17
    public function getProcessInstance(): ExecutionEntity
18
    {
19
        return $this->execution->getProcessInstance();
20
    }
21
22
    public function getProcessDefinition(): ProcessDefinitionEntity
23
    {
24
        return $this->execution->getProcessDefinition();
25
    }
26
27
    protected function getDeploymentId(): string
28
    {
29
        return $this->getProcessDefinition()->getDeploymentId();
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getProcess...on()->getDeploymentId() could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
30
    }
31
}
32