Skip to content

Refactoring for Release 2.0.0#60

Open
dweichert wants to merge 10 commits into2.xfrom
dev/refactoring-and-improvement
Open

Refactoring for Release 2.0.0#60
dweichert wants to merge 10 commits into2.xfrom
dev/refactoring-and-improvement

Conversation

@dweichert
Copy link
Copy Markdown
Owner

General modernization of the code base using PHP syntax introduced after PHP 5.3.

Fixes:
#58 Refactor tests
#59 Add annotations for internal and api classes

- add test case for locale 'de' to FormatterFactoryTest
- use short array syntax
- add type hints for parameters in tests
- add return type hints in tests
- add constant visibility and type
- fix code style (DdateHolydayTest)
- use shorter type cast keywords
- remove class comments that convey no additional information
- make sure package name is EmperorNortonCommands\lib\Ddate for all DDate internal classes
@dweichert dweichert added this to the 2.0.0 milestone Jul 21, 2024
@dweichert dweichert self-assigned this Jul 21, 2024
@dweichert dweichert force-pushed the dev/refactoring-and-improvement branch from 215c13f to b9e87ff Compare July 21, 2024 11:30
- class XDay provides public API for getting days until X-Day from DateTimeInterface
- class DiscordianDate provides public API for getting Discordian Date from DateTimeInterface
@dweichert dweichert force-pushed the dev/refactoring-and-improvement branch from b9e87ff to 1c0fce3 Compare July 23, 2024 22:33
- use Enum for locale parameter
- array short syntax
@dweichert dweichert force-pushed the dev/refactoring-and-improvement branch from 1c0fce3 to 4576541 Compare July 24, 2024 16:41
- create DateTimeImmutable via factory
- add type hint for public method
- rename to method to create instance
- make method to create instance static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant