Code Duplication    Length = 10-10 lines in 4 locations

src/IntlServiceProvider.php 4 locations

@@ 42-51 (lines=10) @@
39
     *
40
     * @return void
41
     */
42
    protected function registerCountry()
43
    {
44
        $this->app->singleton(Country::class, function ($app) {
45
            $repository = new Country;
46
47
            return $repository->setLocale($app['config']['app.locale'])->setFallbackLocale($app['config']['app.fallback_locale']);
48
        });
49
50
        $this->app->alias(Country::class, 'intl.country');
51
    }
52
53
    /**
54
     * Register the currency repository.
@@ 58-67 (lines=10) @@
55
     *
56
     * @return void
57
     */
58
    protected function registerCurrency()
59
    {
60
        $this->app->singleton(Currency::class, function ($app) {
61
            $repository = new Currency;
62
63
            return $repository->setLocale($app['config']['app.locale'])->setFallbackLocale($app['config']['app.fallback_locale']);
64
        });
65
66
        $this->app->alias(Currency::class, 'intl.currency');
67
    }
68
69
    /**
70
     * Register the language repository.
@@ 74-83 (lines=10) @@
71
     *
72
     * @return void
73
     */
74
    protected function registerLanguage()
75
    {
76
        $this->app->singleton(Language::class, function ($app) {
77
            $repository = new Language;
78
79
            return $repository->setLocale($app['config']['app.locale'])->setFallbackLocale($app['config']['app.fallback_locale']);
80
        });
81
82
        $this->app->alias(Language::class, 'intl.language');
83
    }
84
85
    /**
86
     * Register the number repository.
@@ 90-99 (lines=10) @@
87
     *
88
     * @return void
89
     */
90
    protected function registerNumber()
91
    {
92
        $this->app->singleton(Number::class, function ($app) {
93
            $repository = new Number;
94
95
            return $repository->setLocale($app['config']['app.locale'])->setFallbackLocale($app['config']['app.fallback_locale']);
96
        });
97
98
        $this->app->alias(Number::class, 'intl.number');
99
    }
100
101
    /**
102
     * Register the date handler.