File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -952,7 +952,7 @@ public static function suggestType($type)
952
952
// Also allow some more characters for special type hints supported by
953
953
// PHPStan:
954
954
// https://phpstan.org/writing-php-code/phpdoc-types#basic-types .
955
- $ type = preg_replace ('/[^a-zA-Z0-9_ \\\[\]\-<> ,"\{\}\? \':\*\|\&]/ ' , '' , $ type );
955
+ $ type = preg_replace ('/[^a-zA-Z0-9_ \\\[\]\-<> ,"\{\}\? \':\*\|\&\(\) ]/ ' , '' , $ type );
956
956
957
957
return $ type ;
958
958
Original file line number Diff line number Diff line change @@ -102,4 +102,11 @@ class Test {
102
102
// phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
103
103
public string $ search_score ;
104
104
105
+ /**
106
+ * Allow parentheses in the type declaration.
107
+ *
108
+ * @var (\Drupal\user\UserInterface&\PHPUnit\Framework\MockObject\MockObject)|null
109
+ */
110
+ protected $ userMock ;
111
+
105
112
}
Original file line number Diff line number Diff line change @@ -106,4 +106,11 @@ class Test {
106
106
// phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
107
107
public string $search_score;
108
108
109
+ /**
110
+ * Allow parentheses in the type declaration.
111
+ *
112
+ * @var (\Drupal\user\UserInterface&\PHPUnit\Framework\MockObject\MockObject)|null
113
+ */
114
+ protected $userMock;
115
+
109
116
}
You can’t perform that action at this time.
0 commit comments