Ruleset `fully_qualified_strict_types` is creating invalid code
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 32/100
Research direction
Start by reproducing the autofix against tests/integration/features/bootstrap/FeatureContext.php, especially the import at line 27 and the shown docblock. Then inspect the fully_qualified_strict_types rule and its tests; done means the global-namespace type remains valid without an unwanted leading backslash while the intended strict-type fix is preserved.
Written by the indexing model from the issue text.
Description
Talk integration tests have this file which imports TableNode:
https://github.com/nextcloud/spreed/blob/0d1fc13e36e40a6cd8dfa80915ea77f06b835f80/tests/integration/features/bootstrap/FeatureContext.php#L27
But the autofixing is breaking the docs by adding a leading \ because the file itself has no namespace
@@ -914,9 +914,9 @@
* @param string $user
* @param string $identifier
* @param string $apiVersion
- * @param TableNode|null $formData
+ * @param \TableNode|null $formData
*/
- public function userCreatesRoom(string $user, string $identifier, string $apiVersion, TableNode $formData = null): void {
+ public function userCreatesRoom(string $user, string $identifier, string $apiVersion, ?TableNode $formData = null): void {
$this->userCreatesRoomWith($user, $identifier, 201, $apiVersion, $formData);
}
- Dominant language
- PHP
- Stars
- 14
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/coding-standard
-
question
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nextcloud/coding-standard#48 · 4 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nextcloud/coding-standard#47 · 1 comment ·
-
enhancement question
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
nextcloud/coding-standard#42 · 2 comments · 2 reactions ·
-
enhancement question
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
nextcloud/coding-standard#41 · 1 comment · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nextcloud/coding-standard#39 · 1 comment · 1 reaction ·
All issues in nextcloud/coding-standard
Similar issues
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·