Thanks to visit codestin.com
Credit goes to github.com

Skip to content

There seems to be a logic error here #32

@bllex

Description

@bllex

$ormToken = $this->objectManager->getRepository($this->tokenClass)->findOneBy([
'id' => $id,
]);
if (false == $ormToken) {
throw new \LogicException(sprintf('The token with id "%s" could not be found', $id));
}
/** @var \Formapro\Pvm\Doctrine\Process $ormProcess */
$ormProcess = $this->objectManager->getRepository($this->processClass)->findOneBy([
'id' => $ormToken->getProcessId(),
]);
if (false == $ormToken) {
throw new \LogicException(sprintf('The process with id "%s" could not be found', $ormToken->getProcessId()));
}

It seems that both $ormToken is being verified on lines 132 and 141, but it seems that $ormProcess is more logical on line 141.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions