Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Aug 13, 2018
1 parent 99976db commit 0227527
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
4 changes: 0 additions & 4 deletions src/Carbon/Traits/Localization.php
Expand Up @@ -38,7 +38,6 @@ trait Localization
*/
protected $localTranslator;


/**
* Options for diffForHumans().
*
Expand All @@ -49,7 +48,6 @@ trait Localization
/**
* @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
*
* @see settings
*
* @param int $humanDiffOptions
Expand All @@ -62,7 +60,6 @@ public static function setHumanDiffOptions($humanDiffOptions)
/**
* @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
*
* @see settings
*
* @param int $humanDiffOption
Expand All @@ -75,7 +72,6 @@ public static function enableHumanDiffOption($humanDiffOption)
/**
* @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
*
* @see settings
*
* @param int $humanDiffOption
Expand Down
9 changes: 1 addition & 8 deletions src/Carbon/Traits/Options.php
Expand Up @@ -11,8 +11,6 @@

namespace Carbon\Traits;

use Carbon\Carbon;
use Carbon\CarbonImmutable;
use Carbon\CarbonInterface;

/**
Expand All @@ -22,7 +20,7 @@
*
* Depends on the following methods:
*
* @method static Carbon|CarbonImmutable setTimezone
* @method \Carbon\Carbon|\Carbon\CarbonImmutable setTimezone($timezone) Set the timezone
*/
trait Options
{
Expand Down Expand Up @@ -165,7 +163,6 @@ trait Options
/**
* @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
*
* @see settings
*
* Enable the strict mode (or disable with passing false).
Expand Down Expand Up @@ -193,7 +190,6 @@ public static function isStrictModeEnabled()
* You should rather use the ->settings() method.
* Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
*
* @see settings
*
* Indicates if months should be calculated with overflow.
Expand All @@ -212,7 +208,6 @@ public static function useMonthsOverflow($monthsOverflow = true)
* You should rather use the ->settings() method.
* Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
*
* @see settings
*
* Reset the month overflow behavior.
Expand All @@ -239,7 +234,6 @@ public static function shouldOverflowMonths()
* You should rather use the ->settings() method.
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
*
* @see settings
*
* Indicates if years should be calculated with overflow.
Expand All @@ -258,7 +252,6 @@ public static function useYearsOverflow($yearsOverflow = true)
* You should rather use the ->settings() method.
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
*
* @see settings
*
* Reset the month overflow behavior.
Expand Down
6 changes: 5 additions & 1 deletion src/Carbon/Traits/Units.php
Expand Up @@ -217,7 +217,11 @@ public function addUnit($unit, $value = 1, $overflow = null)
} elseif ($canOverflow = in_array($unit, [
'month',
'year',
]) && ($overflow === false || ($overflow === null && !($this->{'local'.($ucUnit = ucfirst($unit).'s').'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}())))) {
]) && ($overflow === false || (
$overflow === null &&
($ucUnit = ucfirst($unit).'s') &&
!($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}())
))) {
$day = $date->day;
}

Expand Down
1 change: 0 additions & 1 deletion tests/Factory/FactoryTest.php
Expand Up @@ -48,4 +48,3 @@ public function testFactory()
$this->assertSame('01/01/2018', $factory->parse('2018-01-01')->format('d/m/Y'));
}
}

0 comments on commit 0227527

Please sign in to comment.