-
Notifications
You must be signed in to change notification settings - Fork 6
Phpstan test2 #81
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
Phpstan test2 #81
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
parameters: | ||
level: 0 | ||
paths: | ||
- . | ||
excludePaths: | ||
- vendor/* | ||
- node_modules/* | ||
- .git/* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
class HelloWorld | ||
{ | ||
public function sayHello(DateTimeImutable $date): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainTypo in typehint: DateTimeImutable → DateTimeImmutable (double "m"). This will result in a fatal TypeError at call time. - public function sayHello(DateTimeImutable $date): void + public function sayHello(DateTimeImmutable $date): void Run: 🏁 Script executed: #!/bin/bash php -l test.php rg -n 'DateTimeImutable|DateTimeImmutable' -S test.php Length of output: 98 🏁 Script executed: #!/bin/bash # Search entire repository for custom definitions or imports of the misspelled or correct class rg -nP 'class\s+DateTimeImutable' . rg -nP 'use\s+.*DateTimeImutable' . rg -nP 'class\s+DateTimeImmutable' . rg -nP 'use\s+.*DateTimeImmutable' . Length of output: 0 Correct typehint typo: use - public function sayHello(DateTimeImutable $date): void + public function sayHello(DateTimeImmutable $date): void 📝 Committable suggestion
Suggested change
public function sayHello(DateTimeImutable $date): void
public function sayHello(DateTimeImmutable $date): void
🤖 Prompt for AI Agents
|
||
{ | ||
echo 'Hello, ' . $date->format('j. n. Y'); | ||
} | ||
} |