Completed
Pull Request — master (#18)
by Propa
09:42
created

Date::setFallbackLocale()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Propaganistas\LaravelIntl;
4
5
use Jenssegers\Date\Date as BaseDate;
6
use Propaganistas\LaravelIntl\Contracts\Intl;
7
8
class Date extends Intl
9
{
10
    /**
11
     * Handle dynamic calls to the object.
12
     *
13
     * @param string $method
14
     * @param array $arguments
15
     * @return mixed
16
     */
17 15
    public function __call($method, $arguments)
18
    {
19 15
        return BaseDate::{$method}(...$arguments);
20
    }
21
22
    /**
23
     * Get the current locale.
24
     *
25
     * @return string
26
     */
27 3
    public function getLocale()
28
    {
29 3
        return BaseDate::getLocale();
30
    }
31
32
    /**
33
     * Set the current locale.
34
     *
35
     * @param $locale
36
     * @return $this
37
     */
38 15
    public function setLocale($locale)
39
    {
40 15
        BaseDate::setLocale($locale);
41
42 15
        return $this;
43
    }
44
45
    /**
46
     * Get the fallback locale.
47
     *
48
     * @return string
49
     */
50 3
    public function getFallbackLocale()
51
    {
52 3
        return BaseDate::getFallbackLocale();
53
    }
54
55
    /**
56
     * Set the fallback locale.
57
     *
58
     * @param $locale
59
     * @return $this
60
     */
61 15
    public function setFallbackLocale($locale)
62
    {
63 15
        BaseDate::setFallbackLocale($locale);
64
65 15
        return $this;
66
    }
67
}