File tree Expand file tree Collapse file tree 6 files changed +15
-15
lines changed Expand file tree Collapse file tree 6 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 11vendor
2+ .phpunit.result.cache
3+ composer.lock
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ before_script:
1010 - composer install --prefer-source --no-interaction
1111
1212script :
13- - ./vendor/bin/phpunit.phar -c ./phpunit.xml --debug --verbose
13+ - ./vendor/bin/phpunit.phar -c ./phpunit.xml --testdox
1414 - ./vendor/bin/phpmd.phar ./src/ text phpmd.xml
15- - ./vendor/bin/phpstan.phar analyse -l 7 ./src
15+ - ./vendor/bin/phpstan.phar analyse -l max ./src
1616 - ./vendor/bin/phpcs.phar ./src --standard=PSR2
1717 - ./vendor/bin/phpcpd.phar ./src
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Run each command in the project root directory.
2121
2222### Execute PHPUnit tests
2323```
24- ./vendor/bin/phpunit.phar -c ./phpunit.xml --debug --verbose
24+ ./vendor/bin/phpunit.phar -c ./phpunit.xml --testdox
2525```
2626
2727### Execute PHPMD checks
@@ -32,5 +32,5 @@ Run each command in the project root directory.
3232### Execute PHPSTAN checks
3333
3434```
35- ./vendor/bin/phpstan analyse -l 4 src/
35+ ./vendor/bin/phpstan.phar analyse -l max ./ src/
3636```
Original file line number Diff line number Diff line change 1818 }
1919 },
2020 "require-dev" : {
21- "tm/tooly-composer-script" : " ~ 1.2.6 "
21+ "tm/tooly-composer-script" : " ^ 1.2"
2222 },
2323 "scripts" : {
2424 "post-install-cmd" : " Tooly\\ ScriptHandler::installPharTools" ,
2727 "extra" : {
2828 "tools" : {
2929 "phpunit" : {
30- "url" : " https://phar.phpunit.de/phpunit-7 .1.2.phar" ,
30+ "url" : " https://phar.phpunit.de/phpunit-8 .1.2.phar" ,
3131 "force-replace" : true
3232 },
3333 "phpmd" : {
34- "url" : " http://static.phpmd.org/php/2.6.0 /phpmd.phar" ,
34+ "url" : " http://static.phpmd.org/php/latest /phpmd.phar" ,
3535 "force-replace" : true
3636 },
3737 "phpcpd" : {
38- "url" : " https://github.com/sebastianbergmann/phpcpd/releases/download/2.0.0 /phpcpd.phar" ,
38+ "url" : " https://phar.phpunit.de /phpcpd.phar" ,
3939 "force-replace" : true
4040 },
4141 "phpcs" : {
42- "url" : " https://github.com/squizlabs/ PHP_CodeSniffer/releases/download/3.2.3 /phpcs.phar" ,
42+ "url" : " https://squizlabs. github.io/ PHP_CodeSniffer/phpcs.phar" ,
4343 "force-replace" : true
4444 },
4545 "phpstan" : {
46- "url" : " https://github.com/phpstan/phpstan/releases/download/0.9.2 /phpstan.phar" ,
46+ "url" : " https://github.com/phpstan/phpstan/releases/download/0.11.5 /phpstan.phar" ,
4747 "force-replace" : true
4848 }
4949 }
Original file line number Diff line number Diff line change 88 convertWarningsToExceptions =" true"
99 processIsolation =" false"
1010 stopOnFailure =" false"
11- syntaxCheck =" false"
1211 bootstrap =" vendor/autoload.php" >
1312
1413 <testsuites >
Original file line number Diff line number Diff line change 22
33namespace FreshP \PhpEnumeration ;
44
5+ use ReflectionClass ;
6+
57abstract class Enum
68{
79 protected $ value ;
@@ -16,7 +18,6 @@ public function __toString(): string
1618 return $ this ->value ;
1719 }
1820
19-
2021 abstract protected function getDefault (): string ;
2122
2223 protected function setValue (string $ value ): void
@@ -32,8 +33,6 @@ protected function setValue(string $value): void
3233
3334 protected function toArray (): array
3435 {
35- $ reflection = new \ReflectionClass ($ this );
36-
37- return $ reflection ->getConstants ();
36+ return (new ReflectionClass (static ::class))->getConstants ();
3837 }
3938}
You can’t perform that action at this time.
0 commit comments