Skip to content

Commit

Permalink
Small change for phpcs to pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavic committed Mar 9, 2018
1 parent 3584051 commit 08bf9b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
9 changes: 5 additions & 4 deletions src/Carbon/Carbon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
}
}

0 comments on commit 08bf9b9

Please sign in to comment.