Skip to content

Commit

Permalink
Revert mixed[]
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Oct 17, 2024
1 parent 6236621 commit 1a6b0a1
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 49 deletions.
24 changes: 12 additions & 12 deletions docs/Annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ Tables should annotate their entity related methods, their relations and behavio
A LocationsTable class would then get the following doc block annotations added if not already present:
```php
/**
* @method \App\Model\Entity\Location get($primaryKey, mixed[] $options = [])
* @method \App\Model\Entity\Location get($primaryKey, array $options = [])
* @method \App\Model\Entity\Location newEmptyEntity()
* @method \App\Model\Entity\Location newEntity(mixed[] $data, mixed[] $options = [])
* @method array<\App\Model\Entity\Location> newEntities(mixed[] $data, mixed[] $options = [])
* @method \App\Model\Entity\Location|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \App\Model\Entity\Location saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \App\Model\Entity\Location patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
* @method array<\App\Model\Entity\Location> patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
* @method \App\Model\Entity\Location findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false saveMany(iterable $entities, mixed[] $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> saveManyOrFail(iterable $entities, mixed[] $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false deleteMany(iterable $entities, mixed[] $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> deleteManyOrFail(iterable $entities, mixed[] $options = [])
* @method \App\Model\Entity\Location newEntity(array $data, array $options = [])
* @method array<\App\Model\Entity\Location> newEntities(array $data, array $options = [])
* @method \App\Model\Entity\Location|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \App\Model\Entity\Location saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \App\Model\Entity\Location patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method array<\App\Model\Entity\Location> patchEntities(iterable $entities, array $data, array $options = [])
* @method \App\Model\Entity\Location findOrCreate($search, ?callable $callback = null, array $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false saveMany(iterable $entities, array $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> saveManyOrFail(iterable $entities, array $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location>|false deleteMany(iterable $entities, array $options = [])
* @method \Cake\Datasource\ResultSetInterface<\App\Model\Entity\Location> deleteManyOrFail(iterable $entities, array $options = [])
*
* @property \Cake\ORM\Association\HasMany<\App\Model\Table\ImagesTable> $Images
* @property \Cake\ORM\Association\BelongsTo<\App\Model\Table\UsersTable> $Users
Expand Down
4 changes: 2 additions & 2 deletions src/Annotator/ModelAnnotator.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ protected function buildAnnotations(array $associations, string $entity, array $
$entityInterface = $fullClassName;
}

$dataType = 'mixed[]';
$optionsType = 'mixed[]';
$dataType = 'array';
$optionsType = 'array';
$itterable = 'iterable';
if (Configure::read('IdeHelper.genericsInParam')) {
$dataType = 'array<mixed>';
Expand Down
4 changes: 2 additions & 2 deletions src/View/Helper/DocBlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ public function buildTableAnnotations(
$classInterface = $class;
}

$dataType = 'mixed[]';
$optionsType = 'mixed[]';
$dataType = 'array';
$optionsType = 'array';
$itterable = 'iterable';
if (Configure::read('IdeHelper.genericsInParam')) {
$dataType = 'array<mixed>';
Expand Down
22 changes: 11 additions & 11 deletions tests/test_files/Model/Table/BarBarsAbstractTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
* @property \Cake\ORM\Association\BelongsToMany<\Awesome\Model\Table\HousesTable> $Houses
*
* @method \TestApp\Model\Entity\BarBarsAbstract newEmptyEntity()
* @method \TestApp\Model\Entity\BarBarsAbstract newEntity(mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[] newEntities(mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract newEntity(array $data, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[] newEntities(array $data, array $options = [])
* @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)
* @method \TestApp\Model\Entity\BarBarsAbstract findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[] patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false saveMany(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> saveManyOrFail(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false deleteMany(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> deleteManyOrFail(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract findOrCreate($search, ?callable $callback = null, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[] patchEntities(iterable $entities, array $data, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false saveMany(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> saveManyOrFail(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract>|false deleteMany(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\BarBarsAbstract[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBarsAbstract> deleteManyOrFail(iterable $entities, array $options = [])
*
* @mixin \Cake\ORM\Behavior\TimestampBehavior
* @mixin \MyNamespace\MyPlugin\Model\Behavior\MyBehavior
Expand Down
22 changes: 11 additions & 11 deletions tests/test_files/Model/Table/BarBarsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
* @property \Cake\ORM\Association\BelongsToMany<\Awesome\Model\Table\HousesTable> $Houses
*
* @method \TestApp\Model\Entity\BarBar newEmptyEntity()
* @method \TestApp\Model\Entity\BarBar newEntity(mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar[] newEntities(mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar newEntity(array $data, array $options = [])
* @method \TestApp\Model\Entity\BarBar[] newEntities(array $data, array $options = [])
* @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)
* @method \TestApp\Model\Entity\BarBar findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar[] patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false saveMany(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> saveManyOrFail(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false deleteMany(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> deleteManyOrFail(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\BarBar findOrCreate($search, ?callable $callback = null, array $options = [])
* @method \TestApp\Model\Entity\BarBar patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \TestApp\Model\Entity\BarBar[] patchEntities(iterable $entities, array $data, array $options = [])
* @method \TestApp\Model\Entity\BarBar|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \TestApp\Model\Entity\BarBar saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false saveMany(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> saveManyOrFail(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar>|false deleteMany(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\BarBar[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\BarBar> deleteManyOrFail(iterable $entities, array $options = [])
*
* @mixin \Cake\ORM\Behavior\TimestampBehavior
* @mixin \MyNamespace\MyPlugin\Model\Behavior\MyBehavior
Expand Down
22 changes: 11 additions & 11 deletions tests/test_files/Model/Table/WheelsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
use Cake\ORM\Table;

/**
* @method \TestApp\Model\Entity\Wheel newEntity(mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel newEntity(array $data, array $options = [])
* @property \Cake\ORM\Association\BelongsTo<\TestApp\Model\Table\CarsTable> $Cars
* @method \TestApp\Model\Entity\Wheel newEmptyEntity()
* @method \TestApp\Model\Entity\Wheel[] newEntities(mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel[] newEntities(array $data, array $options = [])
* @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)
* @method \TestApp\Model\Entity\Wheel findOrCreate($search, ?callable $callback = null, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel patchEntity(\Cake\Datasource\EntityInterface $entity, mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel[] patchEntities(iterable $entities, mixed[] $data, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel|false save(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel saveOrFail(\Cake\Datasource\EntityInterface $entity, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false saveMany(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> saveManyOrFail(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false deleteMany(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> deleteManyOrFail(iterable $entities, mixed[] $options = [])
* @method \TestApp\Model\Entity\Wheel findOrCreate($search, ?callable $callback = null, array $options = [])
* @method \TestApp\Model\Entity\Wheel patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \TestApp\Model\Entity\Wheel[] patchEntities(iterable $entities, array $data, array $options = [])
* @method \TestApp\Model\Entity\Wheel|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \TestApp\Model\Entity\Wheel saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false saveMany(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> saveManyOrFail(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel>|false deleteMany(iterable $entities, array $options = [])
* @method \TestApp\Model\Entity\Wheel[]|\Cake\Datasource\ResultSetInterface<\TestApp\Model\Entity\Wheel> deleteManyOrFail(iterable $entities, array $options = [])
* @mixin \Cake\ORM\Behavior\TreeBehavior
*/
class WheelsTable extends Table {
Expand Down

0 comments on commit 1a6b0a1

Please sign in to comment.