syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'

Viewed 791

I cloned a project from https://github.com/iluminar/goodwork, and when doing composer install it show error said

ParseError

  syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'

  at C:\Users\Vysco Zyza\Videos\goodwork\app\Base\Utilities\ExtendedLivewireComponentsFinder.php:40
     36▕     }
     37▕
     38▕     protected function getName($class)
     39▕     {
  ➜  40▕         $classNamespace = collect(config('livewire.class_namespaces'))->filter(fn ($x) => strpos($class, $x) !== false)->first();
     41▕         $namespace = collect(explode('.', str_replace(['/', '\\'], '.', $classNamespace)))
     42▕             ->map([Str::class, 'kebab'])
     43▕             ->implode('.');
     44▕

  1   C:\Users\Vysco Zyza\Videos\goodwork\vendor\composer\ClassLoader.php:322
      Composer\Autoload\includeFile("C:\Users\Vysco Zyza\Videos\goodwork\vendor\composer/../../app/Base/Utilities/ExtendedLivewireComponentsFinder.php")

  2   [internal]:0
      Composer\Autoload\ClassLoader::loadClass("App\Base\Utilities\ExtendedLivewireComponentsFinder")
Script @php artisan livewire:discover --ansi handling the post-autoload-dump event returned with error code 1

what should I do?

0 Answers
Related