Skip to content

Commit c2a732f

Browse files
committed
Fix PHPStan.
1 parent 951e44f commit c2a732f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Annotator/EntityAnnotator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function hydrateSchemaFromAssoc(array $schema): array {
138138
continue;
139139
}
140140

141-
/** @var \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table> $association */
141+
/** @var \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table<array{}>> $association */
142142
$table = $this->getThrough($association);
143143
if (!$table) {
144144
$table = new Table();
@@ -173,9 +173,9 @@ protected function hydrateSchemaFromAssoc(array $schema): array {
173173
}
174174

175175
/**
176-
* @param \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table> $association
176+
* @param \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table<array{}>> $association
177177
*
178-
* @return \Cake\ORM\Table|null
178+
* @return \Cake\ORM\Table<array{}>|null
179179
*/
180180
protected function getThrough(BelongsToMany $association): ?Table {
181181
try {
@@ -197,7 +197,7 @@ protected function getThrough(BelongsToMany $association): ?Table {
197197
/**
198198
* @uses \Cake\ORM\Association\BelongsToMany::_junctionTableName()
199199
*
200-
* @param \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table> $association
200+
* @param \Cake\ORM\Association\BelongsToMany<\Cake\ORM\Table<array{}>> $association
201201
* @return string
202202
*/
203203
protected function junctionTableName(BelongsToMany $association): string {

src/Annotator/ModelAnnotator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,10 @@ protected function getAssociations(AssociationCollection $tableAssociations): ar
328328
}
329329

330330
/**
331-
* @param \Cake\ORM\Table $table
331+
* @param \Cake\ORM\Table<array{}> $table
332332
* @return array<string>
333333
*/
334-
protected function getBehaviors($table): array {
334+
protected function getBehaviors(Table $table): array {
335335
$object = $table->behaviors();
336336
$map = $this->invokeProperty($object, '_loaded');
337337

@@ -350,7 +350,7 @@ protected function getBehaviors($table): array {
350350
return $behaviors;
351351
}
352352

353-
/** @var \Cake\ORM\Table $parent */
353+
/** @var \Cake\ORM\Table<array{}> $parent */
354354
$parent = new $parentClass();
355355

356356
$object = $parent->behaviors();

src/Generator/Task/EntityTask.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function getEntityFields(): array {
6363
$fields = [];
6464
$tableObject = null;
6565
try {
66-
/** @var \Cake\ORM\Table $tableObject */
66+
/** @var \Cake\ORM\Table<array{}> $tableObject */
6767
$tableObject = new $className();
6868
$fields = $tableObject->getSchema()->columns();
6969

@@ -111,7 +111,7 @@ protected function getEntityFields(): array {
111111
}
112112

113113
/**
114-
* @param \Cake\ORM\Table $table
114+
* @param \Cake\ORM\Table<array{}> $table
115115
*
116116
* @return array<string>
117117
*/

0 commit comments

Comments
 (0)