Skip to content

Commit 15b0b18

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [CS] Replace easy occurences of ?: with ??
2 parents c309827 + 238c0aa commit 15b0b18

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(array $places, array $transitions, $initialPlaces =
4444

4545
$this->setInitialPlaces($initialPlaces);
4646

47-
$this->metadataStore = $metadataStore ?: new InMemoryMetadataStore();
47+
$this->metadataStore = $metadataStore ?? new InMemoryMetadataStore();
4848
}
4949

5050
/**

Metadata/InMemoryMetadataStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(array $workflowMetadata = [], array $placesMetadata
2828
{
2929
$this->workflowMetadata = $workflowMetadata;
3030
$this->placesMetadata = $placesMetadata;
31-
$this->transitionsMetadata = $transitionsMetadata ?: new \SplObjectStorage();
31+
$this->transitionsMetadata = $transitionsMetadata ?? new \SplObjectStorage();
3232
}
3333

3434
public function getWorkflowMetadata(): array

StateMachine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ class StateMachine extends Workflow
2222
{
2323
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed')
2424
{
25-
parent::__construct($definition, $markingStore ?: new MethodMarkingStore(true), $dispatcher, $name);
25+
parent::__construct($definition, $markingStore ?? new MethodMarkingStore(true), $dispatcher, $name);
2626
}
2727
}

Tests/EventListener/GuardListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function testGuardExpressionBlocks()
136136
private function createEvent(Transition $transition = null)
137137
{
138138
$subject = new Subject();
139-
$transition = $transition ?: new Transition('name', 'from', 'to');
139+
$transition = $transition ?? new Transition('name', 'from', 'to');
140140

141141
$workflow = $this->createMock(WorkflowInterface::class);
142142

Workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Workflow implements WorkflowInterface
7070
public function __construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed', array $eventsToDispatch = null)
7171
{
7272
$this->definition = $definition;
73-
$this->markingStore = $markingStore ?: new MethodMarkingStore();
73+
$this->markingStore = $markingStore ?? new MethodMarkingStore();
7474
$this->dispatcher = $dispatcher;
7575
$this->name = $name;
7676
$this->eventsToDispatch = $eventsToDispatch;

0 commit comments

Comments
 (0)