diff --git a/.travis.yml b/.travis.yml index 20bf180..2ccaea0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ +sudo: false language: php php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm install: @@ -12,3 +14,8 @@ install: script: - ./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --strict + - ./vendor/bin/phpcs --standard=PSR2 src + - ./vendor/bin/phpcs --standard=PSR2 tests + +matrix: + fast_finish: true diff --git a/composer.json b/composer.json index fbaf816..5080058 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.*" }, "autoload": { "psr-4": { diff --git a/src/AbstractEnum.php b/src/AbstractEnum.php index 3829ca2..5272ce6 100644 --- a/src/AbstractEnum.php +++ b/src/AbstractEnum.php @@ -67,7 +67,7 @@ public static function exists($value) */ public static function assertExists($value) { - if (static::exists($value) == false) { + if (static::exists($value) === false) { $class = substr(strrchr(get_called_class(), '\\'), 1); throw new \InvalidArgumentException(sprintf('"%s" is not a valid %s value.', $value, $class)); }