nunomaduro / phpinsights

🔰 Instant PHP quality checks from your console
https://phpinsights.com
MIT License
5.28k stars 281 forks source link

DisallowedShortTernaryOperator suppress doesnt work #656

Open keizah7 opened 1 year ago

keizah7 commented 1 year ago
Q A
Bug report? yes
Feature request? no
Library version 2.8

DisallowedShortTernaryOperator suppress doesnt work

class RedirectIfAuthenticated
{
    /**
     * Handle an incoming request.
     *
     * @phpcsSuppress DisallowedShortTernaryOperator
     */
    public function handle(Request $request, Closure $next, string ...$guards)
    {
        $guards = $guards ?: ['web'];
• [Code] Disallow short ternary operator: (SlevomatCodingStandard\Sniffs\ControlStructures\DisallowShortTernaryOperatorSniff)
  app/Http/Middleware/RedirectIfAuthenticated.php:21: Use of short ternary operator is disallowed.