From c0a2ef7d159cc7c9adcfd45a17c80cacfc52c7f3 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 2 Jan 2020 13:01:22 -0600 Subject: [PATCH] Use correct phpcs configuration when running from Travis CI --- .travis.yml | 4 ++-- src/BinaryUtils.php | 6 ++++-- src/Uuid.php | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e43d3a..09d308f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,8 +51,8 @@ before_script: - mkdir -p build/logs script: - - ./resources/scripts/cmd-proxy.sh ./vendor/bin/parallel-lint src tests - - ./resources/scripts/cmd-proxy.sh ./vendor/bin/phpcs src tests --standard=psr2 -sp --colors + - ./resources/scripts/cmd-proxy.sh composer run lint + - ./resources/scripts/cmd-proxy.sh composer run phpcs - ./resources/scripts/cmd-proxy.sh composer run phpstan - ./resources/scripts/cmd-proxy.sh composer run psalm - travis_wait ./resources/scripts/cmd-proxy.sh ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml diff --git a/src/BinaryUtils.php b/src/BinaryUtils.php index e5132a2..12cbe0b 100644 --- a/src/BinaryUtils.php +++ b/src/BinaryUtils.php @@ -14,6 +14,8 @@ declare(strict_types=1); namespace Ramsey\Uuid; +use function is_int; + /** * Provides binary math utilities */ @@ -54,8 +56,8 @@ class BinaryUtils $timeHi = hexdec($timeHi) & 0x0fff; $timeHi |= $version << 12; - assert(\is_int($timeHi)); - + assert(is_int($timeHi)); + return $timeHi; } } diff --git a/src/Uuid.php b/src/Uuid.php index a736aea..1d11580 100644 --- a/src/Uuid.php +++ b/src/Uuid.php @@ -34,9 +34,9 @@ use Ramsey\Uuid\Exception\UnsupportedOperationException; * Note that `uuid1()` may compromise privacy since it creates a UUID containing * the computer’s network address. `uuid4()` creates a random UUID. * - * @psalm-immutable - * * @link http://tools.ietf.org/html/rfc4122 RFC 4122 + * + * @psalm-immutable */ class Uuid implements UuidInterface {