Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter: Verify that keys in the config uses snake_casing #8

Open
ventrec opened this issue Jun 22, 2022 · 0 comments
Open

Linter: Verify that keys in the config uses snake_casing #8

ventrec opened this issue Jun 22, 2022 · 0 comments

Comments

@ventrec
Copy link
Member

ventrec commented Jun 22, 2022

Valid:

<?php

return [
    'pretend' => env('SMS_PRETEND', false),

    'nexmo_api_key' => env('NEXMO_API_KEY', ''),
    'nexmo_api_secret' => env('NEXMO_API_SECRET', ''),
    'nexmo_sender' => env('NEXMO_SENDER', ''),
];

Invalid:

<?php

return [
    'pretend' => env('SMS_PRETEND', false),

    'nexmoApiKey' => env('NEXMO_API_KEY', ''),
    'nexmoApiSecret' => env('NEXMO_API_SECRET', ''),
    'nexmoSender' => env('NEXMO_SENDER', ''),
];

Should also validate nested arrays in a config file. Needs tests.

@ventrec ventrec changed the title Linter: Sjekke at keys i config filer bruker snake_case i naming Linter: Verify that keys in the config uses snake_casing Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant