Code Duplication    Length = 10-10 lines in 4 locations

src/IntlServiceProvider.php 4 locations

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