diff --git a/.travis.yml b/.travis.yml index cceb24dbe2..1cca62e568 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,8 +28,8 @@ install: fi script: - - vendor/bin/phpunit --verbose --coverage-clover=coverage.xml - - if [[ $phpstan = 'true' ]]; then vendor/bin/phpstan analyse --configuration phpstan.neon --level 3 src tests; fi + - composer phpunit + - if [[ $phpstan = 'true' ]]; then composer phpstan; fi after_success: - if [[ $coverage = 'true' ]]; then bash <(curl -s https://codecov.io/bash); fi diff --git a/composer.json b/composer.json index f14889c1e3..7aa5db0c6c 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,8 @@ "@phpunit", "@phpcs" ], - "phpunit": "phpunit", - "phpcs": "php-cs-fixer fix -v --diff --dry-run" + "phpunit": "phpunit --verbose --coverage-clover=coverage.xml", + "phpcs": "php-cs-fixer fix -v --diff --dry-run", + "phpstan": "phpstan analyse --configuration phpstan.neon --level 3 src tests" } } diff --git a/src/Carbon/Carbon.php b/src/Carbon/Carbon.php index bec7d29734..9af0d9d65b 100644 --- a/src/Carbon/Carbon.php +++ b/src/Carbon/Carbon.php @@ -390,7 +390,8 @@ public function __construct($time = null, $tz = null) $timezone = static::safeCreateDateTimeZone($tz); // @codeCoverageIgnoreStart if ($isNow && !isset($testInstance) && ( - version_compare(PHP_VERSION, '7.1.0-dev', '<')) || + version_compare(PHP_VERSION, '7.1.0-dev', '<') + ) || version_compare(PHP_VERSION, '7.1.3-dev', '>=') && version_compare(PHP_VERSION, '7.1.4-dev', '<') ) { $dateTime = new DateTime('now', $timezone); @@ -3846,12 +3847,12 @@ public static function fromSerialized($value) /** * The __set_state handler. * - * @param array $array + * @param array $state * * @return static */ - public static function __set_state($array) + public static function __set_state(array $state) { - return static::instance(parent::__set_state($array)); + return static::instance(parent::__set_state($state)); } }