Closed matthew-muscat closed 7 years ago
This is based on evaluating a laravel config file, which typically only contains a return statement array of configuration values... (ie: https://github.com/laravel/laravel/blob/master/config/app.php)
Example code triggering issue can be located below...
<?php return [ 'api_domain' => env('API_DOMAIN', 'api.example.com'), 'app_id' => env('APP_ID'), 'client_id' => env('CLIENT_ID'), 'client_secret' => env('CLIENT_SECRET'), ];
The error displayed is as follows...
An error occurred during processing; checking has been aborted. The error message was: Undefined index: scope_opener in vendor/escapestudios/symfony2-coding-standard/Symfony/Sniffs/Formatting/ReturnOrThrowSniff.php on line 78 (Internal.Exception)
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Formatting/ReturnOrThrowSniff.php#L78
Notes:
$function variable is returning false, whereas the return of throw sniff is looking for a function call and assumes it's available.
$function
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Formatting/ReturnOrThrowSniff.php#L74
hi @matthew-muscat thanks for the extended bug report! i'll make a fix for this today...
This is based on evaluating a laravel config file, which typically only contains a return statement array of configuration values... (ie: https://github.com/laravel/laravel/blob/master/config/app.php)
Example code triggering issue can be located below...
The error displayed is as follows...
An error occurred during processing; checking has been aborted. The error message was: Undefined index: scope_opener in vendor/escapestudios/symfony2-coding-standard/Symfony/Sniffs/Formatting/ReturnOrThrowSniff.php on line 78 (Internal.Exception)
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Formatting/ReturnOrThrowSniff.php#L78
Notes:
$function
variable is returning false, whereas the return of throw sniff is looking for a function call and assumes it's available.https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Formatting/ReturnOrThrowSniff.php#L74