Skip to content

Conversation

@kenjis
Copy link
Member

@kenjis kenjis commented Apr 21, 2022

No description provided.

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One optimization, rest looks good!

Comment on lines 33 to 36

/** @var SettingsConfig $config */
$config = $config ?? config('Settings');
$config ??= config('Settings');

return new Settings($config);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason this was separate was for the inline type. If that isn't needed we don't need the intermediate variable.

return new Settings($config ?? config('Settings'));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@kenjis kenjis requested a review from MGatner April 24, 2022 23:32
@kenjis kenjis merged commit b261ffa into codeigniter4:develop Apr 25, 2022
@kenjis kenjis deleted the add-types branch April 25, 2022 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants