bingo-soft /
jabe
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Jabe\Impl\Batch; |
||||
| 4 | |||||
| 5 | use Jabe\Impl\Context\Context; |
||||
| 6 | use Jabe\Impl\Core\Variable\Mapping\Value\{ |
||||
| 7 | ConstantValueProvider, |
||||
| 8 | ParameterValueProviderInterface |
||||
| 9 | }; |
||||
| 10 | use Jabe\Impl\JobExecutor\{ |
||||
| 11 | JobDeclaration, |
||||
| 12 | JobHandlerConfigurationInterface |
||||
| 13 | }; |
||||
| 14 | use Jabe\Impl\Persistence\Entity\{ |
||||
| 15 | ExecutionEntity, |
||||
| 16 | JobEntity, |
||||
| 17 | MessageEntity |
||||
| 18 | }; |
||||
| 19 | |||||
| 20 | class BatchSeedJobDeclaration extends JobDeclaration |
||||
| 21 | { |
||||
| 22 | public function __construct() |
||||
| 23 | { |
||||
| 24 | parent::__construct(BatchSeedJobHandler::TYPE); |
||||
| 25 | } |
||||
| 26 | |||||
| 27 | protected function resolveExecution(/*BatchEntity*/$batch): ?ExecutionEntity |
||||
| 28 | { |
||||
| 29 | return null; |
||||
| 30 | } |
||||
| 31 | |||||
| 32 | protected function newJobInstance(/*BatchEntity*/$batch = null): JobEntity |
||||
| 33 | { |
||||
| 34 | return new MessageEntity(); |
||||
| 35 | } |
||||
| 36 | |||||
| 37 | protected function resolveJobHandlerConfiguration(/*BatchEntity*/$batch): JobHandlerConfiguration |
||||
| 38 | { |
||||
| 39 | return new BatchSeedJobConfiguration($batch->getId()); |
||||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||||
| 40 | } |
||||
| 41 | |||||
| 42 | protected function resolveJobDefinitionId(/*BatchEntity*/$batch): string |
||||
| 43 | { |
||||
| 44 | return $batch->getSeedJobDefinitionId(); |
||||
| 45 | } |
||||
| 46 | |||||
| 47 | public function getJobPriorityProvider(): ParameterValueProviderInterface |
||||
| 48 | { |
||||
| 49 | $batchJobPriority = Context::getProcessEngineConfiguration() |
||||
| 50 | ->getBatchJobPriority(); |
||||
|
0 ignored issues
–
show
The method
getBatchJobPriority() does not exist on Jabe\Impl\Cfg\ProcessEngineConfigurationImpl.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||
| 51 | return new ConstantValueProvider($batchJobPriority); |
||||
| 52 | } |
||||
| 53 | } |
||||
| 54 |