Skip to content

Commit a195d00

Browse files
authored
chore: add PHP71Migration ruleset (GoogleCloudPlatform#92)
1 parent 8092108 commit a195d00

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.php_cs.dist.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
return (new PhpCsFixer\Config())
44
->setRules([
55
'@PSR2' => true,
6+
'@PHP71Migration' => true,
67
'concat_space' => ['spacing' => 'one'],
78
'no_unused_imports' => true,
89
'method_argument_space' => false,

src/LegacyEventMapper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class LegacyEventMapper
8181

8282
public function fromJsonData(array $jsonData): CloudEvent
8383
{
84-
list($context, $data) = $this->getLegacyEventContextAndData($jsonData);
84+
[$context, $data] = $this->getLegacyEventContextAndData($jsonData);
8585

8686
$eventType = $context->getEventType();
8787
$resourceName = $context->getResourceName();
@@ -95,7 +95,7 @@ public function fromJsonData(array $jsonData): CloudEvent
9595
$ceService = $context->getService() ?: $this->ceService($eventType);
9696

9797
// Split the background event resource into a CloudEvent resource and subject.
98-
list($ceResource, $ceSubject) = $this->ceResourceAndSubject($ceService, $resourceName);
98+
[$ceResource, $ceSubject] = $this->ceResourceAndSubject($ceService, $resourceName);
9999

100100
$ceTime = $context->getTimestamp();
101101

0 commit comments

Comments
 (0)