Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/workflowengine/lib/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
*/
protected function validateEvents(string $entity, array $events, IOperation $operation): void {
/** @psalm-suppress TaintedCallable newInstance is not called */
$reflection = new \ReflectionClass($entity);

Check failure on line 427 in apps/workflowengine/lib/Manager.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-security

TaintedCallable

apps/workflowengine/lib/Manager.php:427:38: TaintedCallable: Detected tainted text (see https://psalm.dev/243)
if ($entity !== IEntity::class && !in_array(IEntity::class, $reflection->getInterfaceNames())) {
throw new \UnexpectedValueException($this->l->t('Entity %s is invalid', [$entity]));
}
Expand Down Expand Up @@ -466,7 +466,7 @@
}

/** @psalm-suppress TaintedCallable newInstance is not called */
$reflection = new \ReflectionClass($class);

Check failure on line 469 in apps/workflowengine/lib/Manager.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-security

TaintedCallable

apps/workflowengine/lib/Manager.php:469:38: TaintedCallable: Detected tainted text (see https://psalm.dev/243)
if ($class !== IOperation::class && !in_array(IOperation::class, $reflection->getInterfaceNames())) {
throw new \UnexpectedValueException($this->l->t('Operation %s is invalid', [$class]) . join(', ', $reflection->getInterfaceNames()));
}
Expand Down Expand Up @@ -499,7 +499,7 @@
throw new \UnexpectedValueException($this->l->t('The provided check value is too long'));
}

$reflection = new \ReflectionClass($check['class']);

Check failure on line 502 in apps/workflowengine/lib/Manager.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-security

TaintedCallable

apps/workflowengine/lib/Manager.php:502:39: TaintedCallable: Detected tainted text (see https://psalm.dev/243)
if ($check['class'] !== ICheck::class && !in_array(ICheck::class, $reflection->getInterfaceNames())) {
throw new \UnexpectedValueException($this->l->t('Check %s is invalid', [$class]));
}
Expand Down Expand Up @@ -616,9 +616,8 @@
public function formatOperation(array $operation): array {
$checkIds = json_decode($operation['checks'], true);

/** @var list<WorkflowEngineCheck> $checks */
$checks = $this->getChecks($checkIds);
$operation['checks'] = $checks;
$operation['checks'] = array_values($checks);

/** @var list<class-string<IEntityEvent>> $events */
$events = json_decode($operation['events'], true) ?? [];
Expand Down
Loading