Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add @property to Time #8337

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Dec 16, 2023

Description

  • add @property

See https://codeigniter4.github.io/CodeIgniter4/libraries/time.html#getters
Related #8338

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@@ -19,7 +19,22 @@
*
* Requires the intl PHP extension.
*
* @property string $date
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed $date because it cannot be read.

        $time = Time::now();
        dd($time->date); // null

@kenjis
Copy link
Member Author

kenjis commented Dec 16, 2023

@paulbalandan Why cannot we use @property-read?

The phpdoc_no_alias_tag rule replaces it.
https://cs.symfony.com/doc/rules/phpdoc/phpdoc_no_alias_tag.html

@kenjis kenjis merged commit f69a39b into codeigniter4:develop Dec 19, 2023
61 checks passed
@kenjis kenjis deleted the docs-Time-properties branch December 19, 2023 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants