Skip to content

Commit bc7fcff

Browse files
committed
Remove unused integer type interfaces, exception classes, and redundant methods
- Removed `BaseTypeInterface`, `IntTypeInterface`, `TypeException`, and `IntegerTypeException` as they were no longer used. - Replaced integer validation logic with `Webmozart\Assert` for better readability and usability. - Refactored integer type classes (`Integer`, `PositiveInt`, `NonNegativeInt`, `WeekDayInt`) to improve consistency and reduce complexity. - Adjusted test cases to align with new validation behavior and exception handling. - Updated `composer.json` to replace `symfony/polyfill-php83` with `webmozart/assert`. - Refined `psalm` configuration and tests for the newly streamlined codebase.
1 parent e91084a commit bc7fcff

33 files changed

+222
-353
lines changed

.github/workflows/php.yml

100644100755
File mode changed.

.gitignore

100644100755
File mode changed.

.php-cs-fixer.dist.php

100644100755
File mode changed.

README.md

100644100755
File mode changed.

composer.json

100644100755
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "MIT",
66
"require": {
77
"php": ">=8.2",
8-
"symfony/polyfill-php83": "^1.33"
8+
"webmozart/assert": "^1.12"
99
},
1010
"autoload": {
1111
"psr-4": {
@@ -26,21 +26,23 @@
2626
},
2727
"scripts": {
2828
"sca": [
29-
"vendor/bin/psalm --config=psalm.xml --diff --show-info=false --threads=2 --no-cache"
29+
"vendor/bin/psalm --no-cache --config=psalm.xml --diff --show-info=false --threads=2 --no-cache"
3030
],
3131
"sca-baseline": [
32-
"vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml --threads=4"
32+
"vendor/bin/psalm --no-cache --config=psalm.xml --set-baseline=psalm-baseline.xml --threads=4"
3333
],
3434
"cs": [
3535
"vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.dist.php --diff --verbose"
3636
],
3737
"oncheckout": [
38+
"chmod -R 777 ./",
3839
"composer install",
3940
"composer dump-autoload",
4041
"vendor/bin/psalm --clear-cache",
4142
"echo '\\n\\n\\033[1;32mAfter-checkout preparations done!\\033[0m\\n'"
4243
],
4344
"oncommit": [
45+
"chmod -R 777 ./",
4446
"composer validate --strict",
4547
"@cs",
4648
"@sca",

composer.lock

100644100755
Lines changed: 35 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

100644100755
File mode changed.

docker/Dockerfile

100644100755
File mode changed.

docker/php/local.ini

100644100755
File mode changed.

docs/DEVELOP.md

100644100755
File mode changed.

0 commit comments

Comments
 (0)