yiisoft / config

Configuration management
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
31 stars 11 forks source link

Add support prevent run methods via null #113

Open vjik opened 2 years ago

vjik commented 2 years ago

For example:

SwaggerJson::class => [
        'withAnnotationPaths()' => $params['yiisoft/yii-swagger']['annotation-paths'] 
                ? [...$params['yiisoft/yii-swagger']['annotation-paths']] 
                : null,
],

This will prevent call of unnecessary methods and slightly improve performance.