You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class AddAssociationMatchOptionsTypesRuleTest extends RuleTestCase
14
14
{
15
+
use AnalyseCheckLineStartsWithTrait;
16
+
15
17
/**
16
18
* @return \PHPStan\Rules\Rule
17
19
*/
@@ -38,14 +40,7 @@ protected function getRule(): Rule
38
40
*/
39
41
publicfunctiontestRule(): void
40
42
{
41
-
$messageThrough = 'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "through" (Cake\ORM\Table|string|null) does not accept stdClass.';
42
-
if (version_compare(Configure::version(), '5.0.5', '<')) {
43
-
$messageThrough = 'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "through" (Cake\ORM\Table|string) does not accept stdClass.';
44
-
}
45
-
// first argument: path to the example file that contains some errors that should be reported by MyRule
46
-
// second argument: an array of expected errors,
47
-
// each error consists of the asserted error message, and the asserted error file line
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "className" (string) does not accept false.',
51
46
66,
@@ -67,12 +62,14 @@ public function testRule(): void
67
62
66,
68
63
],
69
64
[
70
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "bindingKey" (array<string>|string) does not accept int.',
65
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "bindingKey" ',
71
66
66,
67
+
'Type #1 from the union: 10 is not a list.',
72
68
],
73
69
[
74
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "foreignKey" (array<string>|string|false) does not accept 11.',
70
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "foreignKey" ',
75
71
66,
72
+
'Type #1 from the union: 11 is not a list.',
76
73
],
77
74
[
78
75
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "joinType" (string) does not accept int.',
@@ -107,11 +104,12 @@ public function testRule(): void
107
104
85,
108
105
],
109
106
[
110
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "targetForeignKey" (array<string>|string|null) does not accept Closure.',
107
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "targetForeignKey" ',
111
108
98,
109
+
'Type #1 from the union: Closure(): 10 is not a list.',
112
110
],
113
111
[
114
-
$messageThrough,
112
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "through"',
115
113
98,
116
114
],
117
115
[
@@ -147,12 +145,14 @@ public function testRule(): void
147
145
120,
148
146
],
149
147
[
150
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "bindingKey" (array<string>|string) does not accept int.',
148
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "bindingKey" ',
151
149
120,
150
+
'Type #1 from the union: 10 is not a list.',
152
151
],
153
152
[
154
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "foreignKey" (array<string>|string|false) does not accept 11.',
153
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "foreignKey" ',
155
154
120,
155
+
'Type #1 from the union: 11 is not a list.',
156
156
],
157
157
[
158
158
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "joinType" (string) does not accept int.',
@@ -215,12 +215,14 @@ public function testRule(): void
215
215
148,
216
216
],
217
217
[
218
-
'Call to Cake\ORM\AssociationCollection::load with option "bindingKey" (array<string>|string) does not accept int.',
218
+
'Call to Cake\ORM\AssociationCollection::load with option "bindingKey" ',
219
219
148,
220
+
'Type #1 from the union: 10 is not a list.',
220
221
],
221
222
[
222
-
'Call to Cake\ORM\AssociationCollection::load with option "foreignKey" (array<string>|string|false) does not accept 11.',
223
+
'Call to Cake\ORM\AssociationCollection::load with option "foreignKey" ',
223
224
148,
225
+
'Type #1 from the union: 11 is not a list.',
224
226
],
225
227
[
226
228
'Call to Cake\ORM\AssociationCollection::load with option "joinType" (string) does not accept int.',
0 commit comments