Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Mar 1, 2018
1 parent 7695f34 commit fd00c91
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/Date.php
Expand Up @@ -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)
{
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -81,7 +80,7 @@ public static function parse($time = null, $timezone = null)
);
}

if (! is_int($time)) {
if (!is_int($time)) {
$time = static::translateTimeString($time);
}

Expand Down Expand Up @@ -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
*/
Expand All @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fd00c91

Please sign in to comment.