Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
3.22 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Sep 28, 2017
1 parent 5926395 commit ff54164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Codegen.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private function buildUriBuilders(): void {
))
->setGeneratedFrom($this->getGeneratedFrom())
->setDiscardChanges(
Shapes::idx($this->config, 'discardChanges', false),
Shapes::idx($this->config ?? shape(), 'discardChanges', false),
);

$controllers = $this->controllerFacts->getControllers()->keys();
Expand Down Expand Up @@ -242,7 +242,7 @@ function (classname<HasUriPattern> $class) {
$base,
$param_builder,
))
->setDiscardChanges(Shapes::idx($this->config, 'discardChanges', false))
->setDiscardChanges(Shapes::idx($this->config ?? shape(), 'discardChanges', false))
->setGeneratedFrom($this->getGeneratedFrom());
foreach ($config['trait']['requireExtends'] ?? [] as $what) {
$builder->traitRequireExtends($what);
Expand Down

0 comments on commit ff54164

Please sign in to comment.