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

style: update coding style by php-cs-fixer v3.42.0 #8367

Closed
wants to merge 1 commit into from

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Dec 25, 2023

Description
Update by php-cs-fixer v3.42.0

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

Update by php-cs-fixer v3.42.0
@kenjis kenjis changed the title style: composer cs-fix style: update coding style by php-cs-fixer v3.42.0 Dec 25, 2023
@kenjis
Copy link
Member Author

kenjis commented Dec 25, 2023

Rector adds unneeded @see tags, but it seems to be intentional.

Add @see annotation test of the class for faster jump to test. Make it FQN, so it stays in the annotation, not in the PHP source code.
https://github.com/rectorphp/rector-phpunit/blob/main/docs/rector_rules_overview.md#addseetestannotationrector

1) system/Commands/Database/MigrateStatus.php:18

    ---------- begin diff ----------
@@ @@
  * Displays a list of all migrations and whether they've been run or not.
  *
  * @see MigrateStatusTest
+ * @see \CodeIgniter\Commands\Database\MigrateStatusTest
  */
 class MigrateStatus extends BaseCommand
 {
    ----------- end diff -----------

Applied rules:
 * AddSeeTestAnnotationRector

https://github.com/codeigniter4/CodeIgniter4/actions/runs/7320300308/job/19939228674?pr=8367

kenjis added a commit to kenjis/CodeIgniter4 that referenced this pull request Dec 25, 2023
kenjis added a commit to kenjis/CodeIgniter4 that referenced this pull request Dec 25, 2023
@kenjis
Copy link
Member Author

kenjis commented Dec 25, 2023

@sammyskills Do you think #8367 (comment) is a bug in AddSeeTestAnnotationRector?

kenjis added a commit to kenjis/CodeIgniter4 that referenced this pull request Dec 25, 2023
@sammyskills
Copy link
Contributor

No, I don't think so.

From the docs:

Make it FQN, so it stays in the annotation, not in the PHP source code.

So, the FQN annotation should be used instead.

@kenjis
Copy link
Member Author

kenjis commented Dec 25, 2023

@sammyskills Sorry, I was confused. But thank you for your comment.

I mean @samsonasik See #8367 (comment)

@samsonasik
Copy link
Member

i am on mobile, iirc, @see is generic tag iirc, so that value is detected as text so that expected, i think fqcn should be used.

@kenjis
Copy link
Member Author

kenjis commented Dec 25, 2023

@sammyskills @samsonasik Thank you.
I sent a bug report PHP-CS-Fixer/PHP-CS-Fixer#7620

@kenjis kenjis marked this pull request as draft December 25, 2023 11:32
/** @param array<array-key, string> $matches */
function (array $matches): string {
return $this->cssMatcher($matches);
};
Copy link
Member Author

@kenjis kenjis Dec 25, 2023

Choose a reason for hiding this comment

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

Oh, I accidentally added these changes...

@kenjis kenjis closed this Dec 25, 2023
@kenjis kenjis deleted the update-cs-by-v3.42.0 branch December 29, 2023 00:56
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.

3 participants