Skip to content

Commit a9a1cf1

Browse files
authored
Merge pull request #86 from marc-mabe/feature/74
#74 provide integer (or binary) based EnumSet
2 parents 263102e + 69c499e commit a9a1cf1

File tree

7 files changed

+646
-162
lines changed

7 files changed

+646
-162
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ env:
1616
matrix:
1717
fast_finish: true
1818
include:
19-
- php: 5.5
19+
- php: 5.6
2020
env:
2121
- CODE_COVERAGE="1"
22-
- php: 5.6
22+
- php: 7.0
2323
env:
2424
- PHPDOC="1"
25-
- php: 7.0
2625
- php: 7.1
2726
env:
2827
- CODE_COVERAGE="1"
2928
- php: nightly
29+
30+
# HHVM is no longer supported on Ubuntu Precise. Please consider using Trusty with `dist: trusty`.
3031
- php: hhvm
31-
# HHVM is no longer supported on Ubuntu Precise. Please consider using Trusty with `dist: trusty`.
3232
dist: trusty
3333
allow_failures:
3434
- php: nightly

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "marc-mabe/php-enum",
3-
"description": "Simple and fast implementation of enumerations with native PHP 5.5 and upper",
3+
"description": "Simple and fast implementation of enumerations with native PHP 5.6 and upper",
44
"type": "library",
55
"keywords": [
66
"enum",
@@ -21,14 +21,14 @@
2121
}],
2222
"license": "BSD-3-Clause",
2323
"require": {
24-
"php": ">=5.5",
24+
"php": ">=5.6",
2525
"ext-reflection": "*"
2626
},
2727
"suggest": {
2828
"php": "PHP>=5.4 will be required for using trait EnumSerializableTrait"
2929
},
3030
"require-dev": {
31-
"phpunit/phpunit": "^4.0 || ^5.0",
31+
"phpunit/phpunit": "^5.0",
3232
"phpbench/phpbench": "@dev",
3333

3434
"lstrojny/functional-php": "HHVM: variadic params with type constraints are not supported in non-Hack",

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
beStrictAboutTestsThatDoNotTestAnything="true"
1212
beStrictAboutOutputDuringTests="true"
1313
beStrictAboutTestSize="true"
14-
checkForUnintentionallyCoveredCode="true"
14+
beStrictAboutCoversAnnotation="true"
1515
>
1616
<testsuite name="php-enum Test-Suite">
1717
<directory>./tests</directory>

src/EnumMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ class EnumMap extends SplObjectStorage
2727
*/
2828
public function __construct($enumeration)
2929
{
30-
if (!is_subclass_of($enumeration, __NAMESPACE__ . '\Enum')) {
30+
if (!is_subclass_of($enumeration, Enum::class)) {
3131
throw new InvalidArgumentException(sprintf(
3232
"This EnumMap can handle subclasses of '%s' only",
33-
__NAMESPACE__ . '\Enum'
33+
Enum::class
3434
));
3535
}
3636
$this->enumeration = $enumeration;

0 commit comments

Comments
 (0)