Skip to content

Commit e769eb6

Browse files
Use ??= more
1 parent 0cfffe1 commit e769eb6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Router.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,7 @@ public function getOption(string $key): mixed
176176

177177
public function getRouteCollection()
178178
{
179-
if (null === $this->collection) {
180-
$this->collection = $this->loader->load($this->resource, $this->options['resource_type']);
181-
}
182-
183-
return $this->collection;
179+
return $this->collection ??= $this->loader->load($this->resource, $this->options['resource_type']);
184180
}
185181

186182
public function setContext(RequestContext $context)

0 commit comments

Comments
 (0)