8000 minor #44638 [Workflow] Remove redundant type check (derrabus) · symfony/symfony@f3d3690 · GitHub
[go: up one dir, main page]

Skip to content

Commit f3d3690

Browse files
minor #44638 [Workflow] Remove redundant type check (derrabus)
This PR was merged into the 6.0 branch. Discussion ---------- [Workflow] Remove redundant type check | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A `MarkingStoreInterface::getMarking()` has a native return type `Marking`. The type check I've removed here is thus 100% redundant and can be removed. Commits ------- 60b1672 [Workflow] Remove redundant type check
2 parents d3a33b9 + 60b1672 commit f3d3690

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/Symfony/Component/Workflow/Workflow.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ public function getMarking(object $subject, array $context = []): Marking
8383
{
8484
$marking = $this->markingStore->getMarking($subject);
8585

86-
if (!$marking instanceof Marking) {
87-
throw new LogicException(sprintf('The value returned by the MarkingStore is not an instance of "%s" for workflow "%s".', Marking::class, $this->name));
88-
}
89-
9086
// check if the subject is already in the workflow
9187
if (!$marking->getPlaces()) {
9288
if (!$this->definition->getInitialPlaces()) {

0 commit comments

Comments
 (0)
0