Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There seems to be a logic error here #32

Open
bllex opened this issue Dec 26, 2019 · 0 comments
Open

There seems to be a logic error here #32

bllex opened this issue Dec 26, 2019 · 0 comments

Comments

@bllex
Copy link

bllex commented Dec 26, 2019

$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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant