Commits on Source (45)
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
Enum::fromScalar(): checks if value exists and throws checked/runtime exception when that case happens
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
phpstan: improved strictness of project coding standard See merge request !7
-
Jan Kuchař authored
Enum::getAvailableValues(): support for getting all values of enum (will be useful after scalar value refactoring merge)
-
Jan Kuchař authored
Enum::getAvailableValues(): support for getting all values of enum (will be... See merge request !6
-
Jan Kuchař authored
-
Jan Kuchař authored
Enum::equals(): allow comparing only enum-enum instances (this prevents typo, when comparing to scalar value)
-
Jan Kuchař authored
Enum::equals(): allow comparing only enum-enum instances (this preven…
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
[BC break!] values now contains scalar value on their own: this allows us to compare enum values using loose comparison
-
Jan Kuchař authored
-
Jan Kuchař authored
feature: support for non-strict comparision See merge request !4
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
Mixed keys test See merge request !8
-
Jan Kuchař authored
-
Jan Kuchař authored
\LogicException -> \Grifart\Enum\UsageException See merge request !9
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
Docs update See merge request !11
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
Better access to scalar value See merge request !10
-
Jan Kuchař authored
-
Jan Kuchař authored
test: does comparing across types works as expected? See merge request !12
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
-
Jan Kuchař authored
Cleanup & strictness Closes #1 See merge request !13
Showing
- .gitignore 2 additions, 0 deletions.gitignore
- README.md 110 additions, 23 deletionsREADME.md
- composer.json 12 additions, 5 deletionscomposer.json
- phpstan.neon 4 additions, 0 deletionsphpstan.neon
- run-phpstan.cmd 0 additions, 2 deletionsrun-phpstan.cmd
- src/AutoInstances.php 9 additions, 3 deletionssrc/AutoInstances.php
- src/Enum.php 86 additions, 35 deletionssrc/Enum.php
- src/Internal/ConsistencyChecker.php 28 additions, 9 deletionssrc/Internal/ConsistencyChecker.php
- src/Internal/InstanceRegister.php 11 additions, 6 deletionssrc/Internal/InstanceRegister.php
- src/Internal/Meta.php 108 additions, 12 deletionssrc/Internal/Meta.php
- src/exceptions.php 24 additions, 0 deletionssrc/exceptions.php
- tests/Basic/accessing-scalar-value.phpt 41 additions, 0 deletionstests/Basic/accessing-scalar-value.phpt
- tests/Basic/autoinstances.phpt 2 additions, 2 deletionstests/Basic/autoinstances.phpt
- tests/Basic/equals.phpt 3 additions, 3 deletionstests/Basic/equals.phpt
- tests/Basic/non-strict-value-comparison.phpt 43 additions, 0 deletionstests/Basic/non-strict-value-comparison.phpt
- tests/Basic/stateMachine.phpt 2 additions, 2 deletionstests/Basic/stateMachine.phpt
- tests/Basic/strict-value-comparison.phpt 26 additions, 0 deletionstests/Basic/strict-value-comparison.phpt
- tests/Consistency/finalAndAbstractCheck.phpt 26 additions, 0 deletionstests/Consistency/finalAndAbstractCheck.phpt
- tests/Consistency/methodAnnotations.missing.phpt 2 additions, 2 deletionstests/Consistency/methodAnnotations.missing.phpt
- tests/Consistency/missingInstance.phpt 7 additions, 7 deletionstests/Consistency/missingInstance.phpt
... | ... | @@ -15,7 +15,7 @@ |
"@phpstan", | ||
"@test" | ||
], | ||
"phpstan": "vendor/bin/phpstan analyze -l 7 src tests --no-interaction --ansi --no-progress", | ||
"phpstan": "vendor/bin/phpstan analyze -l 7 -c phpstan.neon --error-format compact --no-interaction --ansi --no-progress -- src", | ||
"test": "vendor/bin/tester tests --colors 1" | ||
}, | ||
... | ... | @@ -25,15 +25,22 @@ |
"autoload": { | ||
"psr-4": { | ||
"Grifart\\Enum\\": "src" | ||
} | ||
}, | ||
"classmap": [ | ||
"src/exceptions.php" | ||
] | ||
}, | ||
"require-dev": { | ||
"nette/tester": "^1.7.0", | ||
"phpstan/phpstan": "^0.8.5" | ||
"nette/tester": "^2.1.0", | ||
"phpstan/phpstan": "^0.10.7", | ||
"phpstan/phpstan-strict-rules": "^0.10.1", | ||
"grifart/phpstan-oneline": "^0.2.0" | ||
}, | ||
"autoload-dev": { | ||
"files": [ | ||
"src/exceptions.php" | ||
] | ||
} | ||
} |
phpstan.neon
0 → 100644
run-phpstan.cmd
deleted
100644 → 0
src/exceptions.php
0 → 100644
tests/Basic/accessing-scalar-value.phpt
0 → 100644
tests/Basic/non-strict-value-comparison.phpt
0 → 100644
tests/Basic/strict-value-comparison.phpt
0 → 100644
tests/Consistency/finalAndAbstractCheck.phpt
0 → 100644