Skip to content

Commit

Permalink
Merge pull request #945 from cakephp/issue-944
Browse files Browse the repository at this point in the history
Fix signature for Table::get() annotation.
  • Loading branch information
markstory committed Sep 27, 2023
2 parents d0dd499 + 783e504 commit 1069077
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/DocBlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public function buildTableAnnotations(
$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 \\{$namespace}\\Model\\Entity\\{$entity} get(\$primaryKey, \$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} patchEntity(\\Cake\\Datasource\\EntityInterface \$entity, array \$data, array \$options = [])";
$annotations[] = "@method \\{$namespace}\\Model\\Entity\\{$entity}[] patchEntities(iterable \$entities, array \$data, array \$options = [])";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @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 \Bake\Test\App\Model\Entity\CategoriesProduct get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\CategoriesProduct[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @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 \Bake\Test\App\Model\Entity\Category get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\Category[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @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 \Bake\Test\App\Model\Entity\Category get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\Category[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @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 \Bake\Test\App\Model\Entity\OldProduct get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\OldProduct[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @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 \Bake\Test\App\Model\Entity\OldProduct get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\OldProduct[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @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 \Bake\Test\App\Model\Entity\ProductVersion get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\ProductVersion[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @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 \Bake\Test\App\Model\Entity\ProductVersion get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\ProductVersion[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeTableConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @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 \Bake\Test\App\Model\Entity\Item get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\Item[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @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 \Bake\Test\App\Model\Entity\TestBakeArticle get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\TestBakeArticle[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeTableRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @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 \Bake\Test\App\Model\Entity\UniqueField get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\UniqueField[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeTableValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @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 \Bake\Test\App\Model\Entity\TestBakeArticle get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\TestBakeArticle[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeTableWithCounterCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @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 \Bake\Test\App\Model\Entity\TodoTask get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\TodoTask[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeTableWithPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @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 \BakeTest\Model\Entity\User get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \BakeTest\Model\Entity\User[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeUpdateTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @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 \Bake\Test\App\Model\Entity\TodoItem get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\TodoItem[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeUpdateTableNoFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @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 \Bake\Test\App\Model\Entity\TodoItem get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\TodoItem[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Model/testBakeWithRulesUnique.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @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 \Bake\Test\App\Model\Entity\User get($primaryKey, $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 patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \Bake\Test\App\Model\Entity\User[] patchEntities(iterable $entities, array $data, array $options = [])
Expand Down

0 comments on commit 1069077

Please sign in to comment.