• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LeTraceurSnorkLibrary / MessSaga / 23794220134

31 Mar 2026 11:08AM UTC coverage: 0.412% (-18.2%) from 18.656%
23794220134

Pull #13

github

web-flow
Merge dd0c58bb9 into b32c68b3f
Pull Request #13: infra: coverage only for unit-tests

3 of 729 relevant lines covered (0.41%)

0.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/Providers/AppServiceProvider.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\Providers;
6

7
use App\Services\Parsers\ParserRegistry;
8
use App\Services\Parsers\TelegramParser;
9
use App\Services\Parsers\WhatsAppParser;
10
use Exception;
11
use Illuminate\Support\Facades\Validator;
12
use Illuminate\Support\Facades\Vite;
13
use Illuminate\Support\ServiceProvider;
14
use Propaganistas\LaravelPhone\PhoneNumber;
15

16
class AppServiceProvider extends ServiceProvider
17
{
18
    /**
19
     * Register any application services.
20
     */
21
    public function register(): void
22
    {
23
        $this->app->singleton(ParserRegistry::class, function ($app) {
×
24
            $registry = new ParserRegistry();
×
25
            $registry->register('telegram', $app->make(TelegramParser::class));
×
26
            $registry->register('whatsapp', $app->make(WhatsAppParser::class));
×
27

28
            return $registry;
×
29
        });
×
30
    }
31

32
    /**
33
     * Bootstrap any application services.
34
     */
35
    public function boot(): void
36
    {
37
        Vite::prefetch(concurrency: 3);
×
38

39
        Validator::extend('phone', function ($attribute, $value, $parameters, $validator) {
×
40
            try {
41
                return new PhoneNumber(
×
42
                    (string)$value,
×
43
                    $parameters
×
44
                        ?: ['RU']
×
45
                )->isValid();
×
46
            } catch (Exception $e) {
×
47
                return false;
×
48
            }
49
        });
×
50
    }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc