laminas / laminas-di

Automated dependency injection for PSR-11 containers
https://docs.laminas.dev/laminas-di/
BSD 3-Clause "New" or "Revised" License
36 stars 20 forks source link

CONFIG: Remove redundant shorthand ternary & fix typos #35

Closed sjokkateer closed 2 years ago

sjokkateer commented 2 years ago

Config::getDataFromArray ensures an array is returned hence the ternary in the Config::__construct seems redundant as the only case the expression evaluates to false is when an empty array was returned and does not need to be re-assigned.

Signed-off-by: Remy Bos 27890746+sjokkateer@users.noreply.github.com

Q A
Documentation no
Bugfix no
BC Break no
New Feature no
RFC no
QA no

Description

The shorthand ternary statements in the constructor of the Config::class seem unnecessary and have hence been removed.

sjokkateer commented 2 years ago

Forgive me if the target branch is incorrect since I was not sure which would be considered the correct one. If there is anything else I am unaware of please let me know.

Ocramius commented 2 years ago

@sjokkateer branch is the correct one, since this is an improvement, thanks! :)