diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5c405870..091e0a30 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,10 @@ parameters: ignoreErrors: + - + message: "#^Instanceof between mixed and Cake\\\\Chronos\\\\Chronos will always evaluate to false\\.$#" + count: 1 + path: src/Command/FixtureCommand.php + - message: "#^Dead catch \\- UnexpectedValueException is never thrown in the try block\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index f5482533..e510fb81 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,18 +1,18 @@ - + - + new Filesystem() - + findRecursive - + new Filesystem() - + find diff --git a/src/View/Helper/DocBlockHelper.php b/src/View/Helper/DocBlockHelper.php index 8fbf1a65..7ebdfcdf 100644 --- a/src/View/Helper/DocBlockHelper.php +++ b/src/View/Helper/DocBlockHelper.php @@ -265,17 +265,17 @@ public function buildTableAnnotations( // phpcs:disable $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} newEmptyEntity()"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} newEntity(array \$data, array \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[] newEntities(array \$data, array \$options = [])"; + $annotations[] = "@method array<\\{$namespace}\\Model\\Entity\\{$entity}> newEntities(array \$data, array \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} get(mixed \$primaryKey, array|string \$finder = 'all', \\Psr\\SimpleCache\\CacheInterface|string|null \$cache = null, \Closure|string|null \$cacheKey = null, mixed ...\$args)"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} findOrCreate(\$search, ?callable \$callback = null, \$options = [])"; + $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} findOrCreate(\$search, ?callable \$callback = null, array \$options = [])"; $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} patchEntity(\\Cake\\Datasource\\EntityInterface \$entity, array \$data, array \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[] patchEntities(iterable \$entities, array \$data, array \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}|false save(\\Cake\\Datasource\\EntityInterface \$entity, \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} saveOrFail(\\Cake\\Datasource\\EntityInterface \$entity, \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable \$entities, \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable \$entities, \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable \$entities, \$options = [])"; - $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable \$entities, \$options = [])"; + $annotations[] = "@method array<\\{$namespace}\\Model\\Entity\\{$entity}> patchEntities(iterable \$entities, array \$data, array \$options = [])"; + $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}|false save(\\Cake\\Datasource\\EntityInterface \$entity, array \$options = [])"; + $annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity} saveOrFail(\\Cake\\Datasource\\EntityInterface \$entity, array \$options = [])"; + $annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}>|false saveMany(iterable \$entities, array \$options = [])"; + $annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}> saveManyOrFail(iterable \$entities, array \$options = [])"; + $annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}>|false deleteMany(iterable \$entities, array \$options = [])"; + $annotations[] = "@method \Cake\Datasource\ResultSetInterface<\\{$namespace}\\Model\\Entity\\{$entity}> deleteManyOrFail(iterable \$entities, array \$options = [])"; // phpcs:enable foreach ($behaviors as $behavior => $behaviorData) { $className = App::className($behavior, 'Model/Behavior', 'Behavior'); diff --git a/tests/comparisons/Model/testBakeAssociationDetectionCategoriesProductsTable.php b/tests/comparisons/Model/testBakeAssociationDetectionCategoriesProductsTable.php index 96b8acdb..d4300fc5 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionCategoriesProductsTable.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionCategoriesProductsTable.php @@ -16,17 +16,17 @@ * * @method \Bake\Test\App\Model\Entity\CategoriesProduct newEmptyEntity() * @method \Bake\Test\App\Model\Entity\CategoriesProduct newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\CategoriesProduct> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\CategoriesProduct get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\CategoriesProduct findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\CategoriesProduct patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\CategoriesProduct[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\CategoriesProduct> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\CategoriesProduct|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\CategoriesProduct saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\CategoriesProduct>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\CategoriesProduct> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\CategoriesProduct>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\CategoriesProduct> deleteManyOrFail(iterable $entities, array $options = []) */ class CategoriesProductsTable extends Table { diff --git a/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTable.php b/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTable.php index 51018afe..689918c6 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTable.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTable.php @@ -15,17 +15,17 @@ * * @method \Bake\Test\App\Model\Entity\Category newEmptyEntity() * @method \Bake\Test\App\Model\Entity\Category newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Category[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\Category> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\Category get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\Category findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\Category findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\Category patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Category[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Category|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\Category saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\Category> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\Category|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\Category saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTableSigned.php b/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTableSigned.php index 51018afe..689918c6 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTableSigned.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionCategoriesTableSigned.php @@ -15,17 +15,17 @@ * * @method \Bake\Test\App\Model\Entity\Category newEmptyEntity() * @method \Bake\Test\App\Model\Entity\Category newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Category[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\Category> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\Category get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\Category findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\Category findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\Category patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Category[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Category|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\Category saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Category[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\Category> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\Category|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\Category saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Category> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTable.php b/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTable.php index 44df8adc..f8f2db58 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTable.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTable.php @@ -13,17 +13,17 @@ * * @method \Bake\Test\App\Model\Entity\OldProduct newEmptyEntity() * @method \Bake\Test\App\Model\Entity\OldProduct newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\OldProduct> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\OldProduct get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\OldProduct findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\OldProduct findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\OldProduct patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\OldProduct> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\OldProduct|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\OldProduct saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTableSigned.php b/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTableSigned.php index 44df8adc..f8f2db58 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTableSigned.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionOldProductsTableSigned.php @@ -13,17 +13,17 @@ * * @method \Bake\Test\App\Model\Entity\OldProduct newEmptyEntity() * @method \Bake\Test\App\Model\Entity\OldProduct newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\OldProduct> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\OldProduct get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\OldProduct findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\OldProduct findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\OldProduct patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\OldProduct[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\OldProduct> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\OldProduct|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\OldProduct saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\OldProduct> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTable.php b/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTable.php index da864a4b..2a27bc94 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTable.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTable.php @@ -15,17 +15,17 @@ * * @method \Bake\Test\App\Model\Entity\ProductVersion newEmptyEntity() * @method \Bake\Test\App\Model\Entity\ProductVersion newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\ProductVersion> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\ProductVersion get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\ProductVersion findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\ProductVersion findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\ProductVersion patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\ProductVersion> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\ProductVersion|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\ProductVersion saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion> deleteManyOrFail(iterable $entities, array $options = []) */ class ProductVersionsTable extends Table { diff --git a/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTableSigned.php b/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTableSigned.php index 0d83db36..f4945bff 100644 --- a/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTableSigned.php +++ b/tests/comparisons/Model/testBakeAssociationDetectionProductVersionsTableSigned.php @@ -15,17 +15,17 @@ * * @method \Bake\Test\App\Model\Entity\ProductVersion newEmptyEntity() * @method \Bake\Test\App\Model\Entity\ProductVersion newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\ProductVersion> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\ProductVersion get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\ProductVersion findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\ProductVersion findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\ProductVersion patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ProductVersion[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\ProductVersion> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\ProductVersion|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\ProductVersion saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ProductVersion> deleteManyOrFail(iterable $entities, array $options = []) */ class ProductVersionsTable extends Table { diff --git a/tests/comparisons/Model/testBakeTableConfig.php b/tests/comparisons/Model/testBakeTableConfig.php index 084110ba..fddc26e9 100644 --- a/tests/comparisons/Model/testBakeTableConfig.php +++ b/tests/comparisons/Model/testBakeTableConfig.php @@ -18,17 +18,17 @@ * * @method \Bake\Test\App\Model\Entity\Item newEmptyEntity() * @method \Bake\Test\App\Model\Entity\Item newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Item[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\Item> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\Item get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\Item findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\Item findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\Item patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Item[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\Item|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\Item saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\Item[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Item[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Item[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\Item[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\Item> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\Item|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\Item saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Item>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Item> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Item>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\Item> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeTableNullableForeignKey.php b/tests/comparisons/Model/testBakeTableNullableForeignKey.php index d55a1c6d..74488b17 100644 --- a/tests/comparisons/Model/testBakeTableNullableForeignKey.php +++ b/tests/comparisons/Model/testBakeTableNullableForeignKey.php @@ -13,17 +13,17 @@ * * @method \Bake\Test\App\Model\Entity\TestBakeArticle newEmptyEntity() * @method \Bake\Test\App\Model\Entity\TestBakeArticle newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\TestBakeArticle> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\TestBakeArticle get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\TestBakeArticle findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\TestBakeArticle patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\TestBakeArticle> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\TestBakeArticle|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\TestBakeArticle saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeTableRules.php b/tests/comparisons/Model/testBakeTableRules.php index f8c59b60..c304fda9 100644 --- a/tests/comparisons/Model/testBakeTableRules.php +++ b/tests/comparisons/Model/testBakeTableRules.php @@ -13,17 +13,17 @@ * * @method \Bake\Test\App\Model\Entity\UniqueField newEmptyEntity() * @method \Bake\Test\App\Model\Entity\UniqueField newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\UniqueField> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\UniqueField get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\UniqueField findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\UniqueField findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\UniqueField patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\UniqueField[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\UniqueField> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\UniqueField|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\UniqueField saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\UniqueField>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\UniqueField> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\UniqueField>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\UniqueField> deleteManyOrFail(iterable $entities, array $options = []) */ class UniqueFieldsTable extends Table { diff --git a/tests/comparisons/Model/testBakeTableValidation.php b/tests/comparisons/Model/testBakeTableValidation.php index d55a1c6d..74488b17 100644 --- a/tests/comparisons/Model/testBakeTableValidation.php +++ b/tests/comparisons/Model/testBakeTableValidation.php @@ -13,17 +13,17 @@ * * @method \Bake\Test\App\Model\Entity\TestBakeArticle newEmptyEntity() * @method \Bake\Test\App\Model\Entity\TestBakeArticle newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\TestBakeArticle> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\TestBakeArticle get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\TestBakeArticle findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\TestBakeArticle patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TestBakeArticle[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\TestBakeArticle> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\TestBakeArticle|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\TestBakeArticle saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TestBakeArticle> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeTableWithCounterCache.php b/tests/comparisons/Model/testBakeTableWithCounterCache.php index d47ae355..aeb57943 100644 --- a/tests/comparisons/Model/testBakeTableWithCounterCache.php +++ b/tests/comparisons/Model/testBakeTableWithCounterCache.php @@ -15,17 +15,17 @@ * * @method \Bake\Test\App\Model\Entity\TodoTask newEmptyEntity() * @method \Bake\Test\App\Model\Entity\TodoTask newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\TodoTask> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\TodoTask get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\TodoTask findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\TodoTask findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\TodoTask patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoTask[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\TodoTask> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\TodoTask|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\TodoTask saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoTask>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoTask> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoTask>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoTask> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior * @mixin \Cake\ORM\Behavior\CounterCacheBehavior diff --git a/tests/comparisons/Model/testBakeTableWithPlugin.php b/tests/comparisons/Model/testBakeTableWithPlugin.php index 779bfd3d..90365132 100644 --- a/tests/comparisons/Model/testBakeTableWithPlugin.php +++ b/tests/comparisons/Model/testBakeTableWithPlugin.php @@ -16,17 +16,17 @@ * * @method \BakeTest\Model\Entity\User newEmptyEntity() * @method \BakeTest\Model\Entity\User newEntity(array $data, array $options = []) - * @method \BakeTest\Model\Entity\User[] newEntities(array $data, array $options = []) + * @method array<\BakeTest\Model\Entity\User> newEntities(array $data, array $options = []) * @method \BakeTest\Model\Entity\User get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \BakeTest\Model\Entity\User findOrCreate($search, ?callable $callback = null, $options = []) + * @method \BakeTest\Model\Entity\User findOrCreate($search, ?callable $callback = null, array $options = []) * @method \BakeTest\Model\Entity\User patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \BakeTest\Model\Entity\User[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \BakeTest\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \BakeTest\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \BakeTest\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \BakeTest\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \BakeTest\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \BakeTest\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\BakeTest\Model\Entity\User> patchEntities(iterable $entities, array $data, array $options = []) + * @method \BakeTest\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \BakeTest\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\BakeTest\Model\Entity\User>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\BakeTest\Model\Entity\User> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\BakeTest\Model\Entity\User>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\BakeTest\Model\Entity\User> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeUpdateTable.php b/tests/comparisons/Model/testBakeUpdateTable.php index 210f9480..2627306b 100644 --- a/tests/comparisons/Model/testBakeUpdateTable.php +++ b/tests/comparisons/Model/testBakeUpdateTable.php @@ -20,17 +20,17 @@ * * @method \Bake\Test\App\Model\Entity\TodoItem newEmptyEntity() * @method \Bake\Test\App\Model\Entity\TodoItem newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\TodoItem> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\TodoItem get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\TodoItem findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\TodoItem findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\TodoItem patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\TodoItem> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\TodoItem|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\TodoItem saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeUpdateTableNoFile.php b/tests/comparisons/Model/testBakeUpdateTableNoFile.php index b1490c24..4dc03f9b 100644 --- a/tests/comparisons/Model/testBakeUpdateTableNoFile.php +++ b/tests/comparisons/Model/testBakeUpdateTableNoFile.php @@ -18,17 +18,17 @@ * * @method \Bake\Test\App\Model\Entity\TodoItem newEmptyEntity() * @method \Bake\Test\App\Model\Entity\TodoItem newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\TodoItem> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\TodoItem get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\TodoItem findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\TodoItem findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\TodoItem patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\TodoItem[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\TodoItem> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\TodoItem|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\TodoItem saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\TodoItem> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/comparisons/Model/testBakeWithRulesUnique.php b/tests/comparisons/Model/testBakeWithRulesUnique.php index 3e7f1331..4b69abe1 100644 --- a/tests/comparisons/Model/testBakeWithRulesUnique.php +++ b/tests/comparisons/Model/testBakeWithRulesUnique.php @@ -16,17 +16,17 @@ * * @method \Bake\Test\App\Model\Entity\User newEmptyEntity() * @method \Bake\Test\App\Model\Entity\User newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\User[] newEntities(array $data, array $options = []) + * @method array<\Bake\Test\App\Model\Entity\User> newEntities(array $data, array $options = []) * @method \Bake\Test\App\Model\Entity\User get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args) - * @method \Bake\Test\App\Model\Entity\User findOrCreate($search, ?callable $callback = null, $options = []) + * @method \Bake\Test\App\Model\Entity\User findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\User patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\User[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\User[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\User> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\User|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\User saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\User>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\User> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\User>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\User> deleteManyOrFail(iterable $entities, array $options = []) * * @mixin \Cake\ORM\Behavior\TimestampBehavior */ diff --git a/tests/test_app/App/Model/Table/ParseTestTable.php b/tests/test_app/App/Model/Table/ParseTestTable.php index 11187de2..217e1f6e 100644 --- a/tests/test_app/App/Model/Table/ParseTestTable.php +++ b/tests/test_app/App/Model/Table/ParseTestTable.php @@ -13,17 +13,17 @@ * * @method \Bake\Test\App\Model\Entity\ParseTestTable newEmptyEntity() * @method \Bake\Test\App\Model\Entity\ParseTestTable newEntity(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable[] newEntities(array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable get($primaryKey, $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable findOrCreate($search, ?callable $callback = null, $options = []) + * @method array<\Bake\Test\App\Model\Entity\ParseTestTable> newEntities(array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\ParseTestTable get($primaryKey, array $options = []) + * @method \Bake\Test\App\Model\Entity\ParseTestTable findOrCreate($search, ?callable $callback = null, array $options = []) * @method \Bake\Test\App\Model\Entity\ParseTestTable patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable[] patchEntities(iterable $entities, array $data, array $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable|false save(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable saveOrFail(\Cake\Datasource\EntityInterface $entity, $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable[]|\Cake\Datasource\ResultSetInterface|false saveMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable[]|\Cake\Datasource\ResultSetInterface saveManyOrFail(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable[]|\Cake\Datasource\ResultSetInterface|false deleteMany(iterable $entities, $options = []) - * @method \Bake\Test\App\Model\Entity\ParseTestTable[]|\Cake\Datasource\ResultSetInterface deleteManyOrFail(iterable $entities, $options = []) + * @method array<\Bake\Test\App\Model\Entity\ParseTestTable> patchEntities(iterable $entities, array $data, array $options = []) + * @method \Bake\Test\App\Model\Entity\ParseTestTable|false save(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Bake\Test\App\Model\Entity\ParseTestTable saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ParseTestTable>|false saveMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ParseTestTable> saveManyOrFail(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ParseTestTable>|false deleteMany(iterable $entities, array $options = []) + * @method \Cake\Datasource\ResultSetInterface<\Bake\Test\App\Model\Entity\ParseTestTable> deleteManyOrFail(iterable $entities, array $options = []) */ class ParseTestTable extends Table {