From fd00c91d0389f00207a90d2fc5c4e31d34341e2d Mon Sep 17 00:00:00 2001 From: Jens Segers Date: Thu, 1 Mar 2018 10:48:40 +0100 Subject: [PATCH] Linting --- src/Date.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Date.php b/src/Date.php index 13f09a1..c772e29 100644 --- a/src/Date.php +++ b/src/Date.php @@ -33,9 +33,8 @@ class Date extends Carbon /** * Returns new DateTime object. * - * @param string $time + * @param string $time * @param string|DateTimeZone $timezone - * @return Date */ public function __construct($time = null, $timezone = null) { @@ -56,7 +55,7 @@ public function __construct($time = null, $timezone = null) /** * Create and return new Date instance. * - * @param string $time + * @param string $time * @param string|DateTimeZone $timezone * @return Date */ @@ -68,7 +67,7 @@ public static function make($time = null, $timezone = null) /** * Create a Date instance from a string. * - * @param string $time + * @param string $time * @param string|DateTimeZone $timezone * @return Date */ @@ -81,7 +80,7 @@ public static function parse($time = null, $timezone = null) ); } - if (! is_int($time)) { + if (!is_int($time)) { $time = static::translateTimeString($time); } @@ -198,7 +197,7 @@ public function format($format) /** * Gets the timespan between this date and another date. * - * @param Date $time + * @param Date $time * @param string|DateTimeZone $timezone * @return int */ @@ -208,7 +207,7 @@ public function timespan($time = null, $timezone = null) $lang = $this->getTranslator(); // Create Date instance if needed - if (! $time instanceof static) { + if (!$time instanceof static) { $time = Date::parse($time, $timezone); } @@ -296,9 +295,9 @@ public static function getLocale() public static function setLocale($locale) { // Use RFC 5646 for filenames. - $resource = __DIR__.'/Lang/'.str_replace('_', '-', $locale).'.php'; + $resource = __DIR__ . '/Lang/' . str_replace('_', '-', $locale) . '.php'; - if (! file_exists($resource)) { + if (!file_exists($resource)) { static::setLocale(static::getFallbackLocale()); return;