for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace EasyPanel\Services;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
class LangManager
{
public static function get()
$files = collect(File::glob(resource_path('lang/*_panel.json')));
return $files->mapWithKeys(function ($file, $key){
$key
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
return $files->mapWithKeys(function ($file, /** @scrutinizer ignore-unused */ $key){
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
preg_match('/(\w+)_panel\.json/i', $file, $m);
$key = "$m[1]_panel";
$value = Str::upper($m[1]);
return [$key => $value];
})->toArray();
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.