|
|
@@ -3,6 +3,7 @@ declare(strict_types=1);
|
|
|
|
|
|
namespace TestApp\Model\Table;
|
|
|
|
|
|
+use Cake\Datasource\QueryInterface;
|
|
|
use Cake\ORM\Table;
|
|
|
|
|
|
/**
|
|
|
@@ -10,12 +11,20 @@ use Cake\ORM\Table;
|
|
|
*/
|
|
|
class TestTable extends Table
|
|
|
{
|
|
|
- public function initialize(array $config = []): void
|
|
|
+ /**
|
|
|
+ * @param array $config
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function initialize(array $config): void
|
|
|
{
|
|
|
$this->setSchema(['id' => ['type' => 'integer']]);
|
|
|
}
|
|
|
|
|
|
- public function findPublished($query)
|
|
|
+ /**
|
|
|
+ * @param \Cake\Datasource\QueryInterface $query
|
|
|
+ * @return \Cake\Datasource\QueryInterface
|
|
|
+ */
|
|
|
+ public function findPublished(QueryInterface $query)
|
|
|
{
|
|
|
return $query->applyOptions(['this' => 'worked']);
|
|
|
}
|