| 1 | <?php namespace Propaganistas\LaravelIntl; |
||
| 7 | class Date |
||
| 8 | { |
||
| 9 | use LocaleCallback; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var \Jenssegers\Date\Date |
||
| 13 | */ |
||
| 14 | protected $date; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Date constructor. |
||
| 18 | */ |
||
| 19 | 15 | public function __construct() |
|
| 20 | { |
||
| 21 | 15 | $this->date = \Jenssegers\Date\Date::make(); |
|
| 22 | 15 | $this->setLocale(App::getLocale()); |
|
|
|
|||
| 23 | 15 | $this->setFallbackLocale(Config::get('app.fallback_locale')); |
|
| 24 | 15 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * Handle dynamic calls to the object. |
||
| 28 | * |
||
| 29 | * @param string $method |
||
| 30 | * @param array $args |
||
| 31 | * @return mixed |
||
| 32 | */ |
||
| 33 | 15 | public function __call($method, $args) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Spoofed setLocale method. |
||
| 44 | * |
||
| 45 | * @param string $locale |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | 15 | public function _setLocale($locale) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Spoofed setFallbackLocale method. |
||
| 57 | * |
||
| 58 | * @param string $locale |
||
| 59 | * @return $this |
||
| 60 | */ |
||
| 61 | 15 | public function _setFallbackLocale($locale) |
|
| 67 | } |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.