Skip to content

Commit 1a6b0a1

Browse files
committed
Revert mixed[]
1 parent 6236621 commit 1a6b0a1

File tree

6 files changed

+49
-49
lines changed

6 files changed

+49
-49
lines changed

docs/Annotations.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ Tables should annotate their entity related methods, their relations and behavio
7272
A LocationsTable class would then get the following doc block annotations added if not already present:
7373
```php
7474
/**
75-
* @method \App\Model\Entity\Location get($primaryKey, mixed[] $options = [])
75+
* @method \App\Model\Entity\Location get($primaryKey, array $options = [])
7676
* @method \App\Model\Entity\Location newEmptyEntity()
77-
* @method \App\Model\Entity\Location newEntity(mixed[] $data, mixed[] $options = [])
78-
* @method array<\App\Model\Entity\Location> newEntities(mixed[] $data, mixed[] $options = [])
79-
* @method \App\Model\Entity\Location|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
80-
* @method \App\Model\Entity\Location saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
81-
* @method \App\Model\Entity\Location patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
82-
* @method array<\App\Model\Entity\Location> patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
83-
* @method \App\Model\Entity\Location findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
84-
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false saveMany(iterable $entities, mixed[] $options = [])
85-
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> saveManyOrFail(iterable $entities, mixed[] $options = [])
86-
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false deleteMany(iterable $entities, mixed[] $options = [])
87-
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> deleteManyOrFail(iterable $entities, mixed[] $options = [])
77+
* @method \App\Model\Entity\Location newEntity(array $data, array $options = [])
78+
* @method array<\App\Model\Entity\Location> newEntities(array $data, array $options = [])
79+
* @method \App\Model\Entity\Location|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
80+
* @method \App\Model\Entity\Location saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
81+
* @method \App\Model\Entity\Location patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
82+
* @method array<\App\Model\Entity\Location> patchEntities(iterable $entities, array $data, array $options = [])
83+
* @method \App\Model\Entity\Location findOrCreate($search, ?callable $callback = null, array $options = [])
84+
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false saveMany(iterable $entities, array $options = [])
85+
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> saveManyOrFail(iterable $entities, array $options = [])
86+
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false deleteMany(iterable $entities, array $options = [])
87+
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> deleteManyOrFail(iterable $entities, array $options = [])
8888
*
8989
* @property \Cake\ORM\Association\HasMany<\App\Model\Table\ImagesTable> $Images
9090
* @property \Cake\ORM\Association\BelongsTo<\App\Model\Table\UsersTable> $Users

src/Annotator/ModelAnnotator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ protected function buildAnnotations(array $associations, string $entity, array $
153153
$entityInterface = $fullClassName;
154154
}
155155

156-
$dataType = 'mixed[]';
157-
$optionsType = 'mixed[]';
156+
$dataType = 'array';
157+
$optionsType = 'array';
158158
$itterable = 'iterable';
159159
if (Configure::read('IdeHelper.genericsInParam')) {
160160
$dataType = 'array<mixed>';

src/View/Helper/DocBlockHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ public function buildTableAnnotations(
159159
$classInterface = $class;
160160
}
161161

162-
$dataType = 'mixed[]';
163-
$optionsType = 'mixed[]';
162+
$dataType = 'array';
163+
$optionsType = 'array';
164164
$itterable = 'iterable';
165165
if (Configure::read('IdeHelper.genericsInParam')) {
166166
$dataType = 'array<mixed>';

tests/test_files/Model/Table/BarBarsAbstractTable.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
* @property \Cake\ORM\Association\BelongsToMany<\Awesome\Model\Table\HousesTable> $Houses
77
*
88
* @method \TestApp\Model\Entity\BarBarsAbstract newEmptyEntity()
9-
* @method \TestApp\Model\Entity\BarBarsAbstract newEntity(mixed[] $data, mixed[] $options = [])
10-
* @method \TestApp\Model\Entity\BarBarsAbstract[] newEntities(mixed[] $data, mixed[] $options = [])
9+
* @method \TestApp\Model\Entity\BarBarsAbstract newEntity(array $data, array $options = [])
10+
* @method \TestApp\Model\Entity\BarBarsAbstract[] newEntities(array $data, array $options = [])
1111
* @method \TestApp\Model\Entity\BarBarsAbstract get(mixed $primaryKey, string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args)
12-
* @method \TestApp\Model\Entity\BarBarsAbstract findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
13-
* @method \TestApp\Model\Entity\BarBarsAbstract patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
14-
* @method \TestApp\Model\Entity\BarBarsAbstract[] patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
15-
* @method \TestApp\Model\Entity\BarBarsAbstract|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
16-
* @method \TestApp\Model\Entity\BarBarsAbstract saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
17-
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false saveMany(iterable $entities, mixed[] $options = [])
18-
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> saveManyOrFail(iterable $entities, mixed[] $options = [])
19-
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false deleteMany(iterable $entities, mixed[] $options = [])
20-
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> deleteManyOrFail(iterable $entities, mixed[] $options = [])
12+
* @method \TestApp\Model\Entity\BarBarsAbstract findOrCreate($search, ?callable $callback = null, array $options = [])
13+
* @method \TestApp\Model\Entity\BarBarsAbstract patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
14+
* @method \TestApp\Model\Entity\BarBarsAbstract[] patchEntities(iterable $entities, array $data, array $options = [])
15+
* @method \TestApp\Model\Entity\BarBarsAbstract|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
16+
* @method \TestApp\Model\Entity\BarBarsAbstract saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
17+
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false saveMany(iterable $entities, array $options = [])
18+
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> saveManyOrFail(iterable $entities, array $options = [])
19+
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false deleteMany(iterable $entities, array $options = [])
20+
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> deleteManyOrFail(iterable $entities, array $options = [])
2121
*
2222
* @mixin \Cake\ORM\Behavior\TimestampBehavior
2323
* @mixin \MyNamespace\MyPlugin\Model\Behavior\MyBehavior

tests/test_files/Model/Table/BarBarsTable.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
* @property \Cake\ORM\Association\BelongsToMany<\Awesome\Model\Table\HousesTable> $Houses
99
*
1010
* @method \TestApp\Model\Entity\BarBar newEmptyEntity()
11-
* @method \TestApp\Model\Entity\BarBar newEntity(mixed[] $data, mixed[] $options = [])
12-
* @method \TestApp\Model\Entity\BarBar[] newEntities(mixed[] $data, mixed[] $options = [])
11+
* @method \TestApp\Model\Entity\BarBar newEntity(array $data, array $options = [])
12+
* @method \TestApp\Model\Entity\BarBar[] newEntities(array $data, array $options = [])
1313
* @method \TestApp\Model\Entity\BarBar get(mixed $primaryKey, string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args)
14-
* @method \TestApp\Model\Entity\BarBar findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
15-
* @method \TestApp\Model\Entity\BarBar patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
16-
* @method \TestApp\Model\Entity\BarBar[] patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
17-
* @method \TestApp\Model\Entity\BarBar|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
18-
* @method \TestApp\Model\Entity\BarBar saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
19-
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false saveMany(iterable $entities, mixed[] $options = [])
20-
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> saveManyOrFail(iterable $entities, mixed[] $options = [])
21-
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false deleteMany(iterable $entities, mixed[] $options = [])
22-
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> deleteManyOrFail(iterable $entities, mixed[] $options = [])
14+
* @method \TestApp\Model\Entity\BarBar findOrCreate($search, ?callable $callback = null, array $options = [])
15+
* @method \TestApp\Model\Entity\BarBar patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
16+
* @method \TestApp\Model\Entity\BarBar[] patchEntities(iterable $entities, array $data, array $options = [])
17+
* @method \TestApp\Model\Entity\BarBar|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
18+
* @method \TestApp\Model\Entity\BarBar saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
19+
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false saveMany(iterable $entities, array $options = [])
20+
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> saveManyOrFail(iterable $entities, array $options = [])
21+
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false deleteMany(iterable $entities, array $options = [])
22+
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> deleteManyOrFail(iterable $entities, array $options = [])
2323
*
2424
* @mixin \Cake\ORM\Behavior\TimestampBehavior
2525
* @mixin \MyNamespace\MyPlugin\Model\Behavior\MyBehavior

tests/test_files/Model/Table/WheelsTable.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
use Cake\ORM\Table;
55

66
/**
7-
* @method \TestApp\Model\Entity\Wheel newEntity(mixed[] $data, mixed[] $options = [])
7+
* @method \TestApp\Model\Entity\Wheel newEntity(array $data, array $options = [])
88
* @property \Cake\ORM\Association\BelongsTo<\TestApp\Model\Table\CarsTable> $Cars
99
* @method \TestApp\Model\Entity\Wheel newEmptyEntity()
10-
* @method \TestApp\Model\Entity\Wheel[] newEntities(mixed[] $data, mixed[] $options = [])
10+
* @method \TestApp\Model\Entity\Wheel[] newEntities(array $data, array $options = [])
1111
* @method \TestApp\Model\Entity\Wheel get(mixed $primaryKey, string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args)
12-
* @method \TestApp\Model\Entity\Wheel findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
13-
* @method \TestApp\Model\Entity\Wheel patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
14-
* @method \TestApp\Model\Entity\Wheel[] patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
15-
* @method \TestApp\Model\Entity\Wheel|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
16-
* @method \TestApp\Model\Entity\Wheel saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
17-
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false saveMany(iterable $entities, mixed[] $options = [])
18-
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> saveManyOrFail(iterable $entities, mixed[] $options = [])
19-
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false deleteMany(iterable $entities, mixed[] $options = [])
20-
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> deleteManyOrFail(iterable $entities, mixed[] $options = [])
12+
* @method \TestApp\Model\Entity\Wheel findOrCreate($search, ?callable $callback = null, array $options = [])
13+
* @method \TestApp\Model\Entity\Wheel patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
14+
* @method \TestApp\Model\Entity\Wheel[] patchEntities(iterable $entities, array $data, array $options = [])
15+
* @method \TestApp\Model\Entity\Wheel|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
16+
* @method \TestApp\Model\Entity\Wheel saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
17+
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false saveMany(iterable $entities, array $options = [])
18+
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> saveManyOrFail(iterable $entities, array $options = [])
19+
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false deleteMany(iterable $entities, array $options = [])
20+
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> deleteManyOrFail(iterable $entities, array $options = [])
2121
* @mixin \Cake\ORM\Behavior\TreeBehavior
2222
*/
2323
class WheelsTable extends Table {

0 commit comments

Comments
 (0)