squareetlabs /
LaravelToon
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Squareetlabs\LaravelToon; |
||
| 6 | |||
| 7 | use Illuminate\Support\ServiceProvider; |
||
| 8 | use Squareetlabs\LaravelToon\Console\Commands\ToonAnalyzeCommand; |
||
| 9 | use Squareetlabs\LaravelToon\Console\Commands\ToonBenchmarkCommand; |
||
| 10 | use Squareetlabs\LaravelToon\Console\Commands\ToonConvertCommand; |
||
| 11 | use Squareetlabs\LaravelToon\Console\Commands\ToonDashboardCommand; |
||
|
0 ignored issues
–
show
|
|||
| 12 | use Squareetlabs\LaravelToon\Services\CompressionMetrics; |
||
| 13 | use Squareetlabs\LaravelToon\Services\CostCalculator; |
||
|
0 ignored issues
–
show
The type
Squareetlabs\LaravelToon\Services\CostCalculator was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 14 | use Squareetlabs\LaravelToon\Services\TokenAnalyzer; |
||
| 15 | use Squareetlabs\LaravelToon\Services\ToonService; |
||
| 16 | |||
| 17 | class LaravelToonServiceProvider extends ServiceProvider |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Servicios principales de LaravelToon. |
||
| 21 | */ |
||
| 22 | public function register(): void |
||
| 23 | { |
||
| 24 | $this->mergeConfigFrom( |
||
| 25 | __DIR__.'/../config/laravel-toon.php', |
||
| 26 | 'laravel-toon' |
||
| 27 | ); |
||
| 28 | |||
| 29 | // Registrar servicios principales |
||
| 30 | $this->app->singleton('toon', function ($app) { |
||
| 31 | return new ToonService(); |
||
| 32 | }); |
||
| 33 | |||
| 34 | $this->app->singleton(ToonService::class, function ($app) { |
||
| 35 | return $app->make('toon'); |
||
| 36 | }); |
||
| 37 | |||
| 38 | $this->app->singleton(TokenAnalyzer::class, function ($app) { |
||
| 39 | return new TokenAnalyzer(); |
||
| 40 | }); |
||
| 41 | |||
| 42 | $this->app->singleton(CompressionMetrics::class, function ($app) { |
||
| 43 | return new CompressionMetrics(); |
||
| 44 | }); |
||
| 45 | |||
| 46 | $this->app->singleton(CostCalculator::class, function ($app) { |
||
| 47 | return new CostCalculator(config('laravel-toon.cost_calculation.models', [])); |
||
| 48 | }); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Inicializar servicios en la aplicación. |
||
| 53 | */ |
||
| 54 | public function boot(): void |
||
| 55 | { |
||
| 56 | // Publicar configuración |
||
| 57 | $this->publishes([ |
||
| 58 | __DIR__.'/../config/laravel-toon.php' => config_path('laravel-toon.php'), |
||
| 59 | ], 'laravel-toon-config'); |
||
| 60 | |||
| 61 | // Registrar comandos Artisan |
||
| 62 | if ($this->app->runningInConsole()) { |
||
| 63 | $this->commands([ |
||
| 64 | ToonConvertCommand::class, |
||
| 65 | ToonAnalyzeCommand::class, |
||
| 66 | ToonBenchmarkCommand::class, |
||
| 67 | ToonDashboardCommand::class, |
||
| 68 | ]); |
||
| 69 | } |
||
| 70 | } |
||
| 71 | } |
||
| 72 | |||
| 73 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths