Skip to content

Conversation

@MarwanSalim
Copy link
Contributor

Update documentation based on the latest code changes.

Ref 1:

public function getQueryBuilder(string $type): Query
{
return match ($type) {
Query::TYPE_SELECT => $this->getDecoratedConnection()->selectQuery(),
Query::TYPE_INSERT => $this->getDecoratedConnection()->insertQuery(),
Query::TYPE_UPDATE => $this->getDecoratedConnection()->updateQuery(),
Query::TYPE_DELETE => $this->getDecoratedConnection()->deleteQuery(),
default => throw new InvalidArgumentException(
'Query type must be one of: `select`, `insert`, `update`, `delete`.'
)
};
}

Update documentation based on the latest code changes

```php
    /**
     * @inheritdoc
     */
    public function getQueryBuilder(string $type): Query
    {
        return match ($type) {
            Query::TYPE_SELECT => $this->getDecoratedConnection()->selectQuery(),
            Query::TYPE_INSERT => $this->getDecoratedConnection()->insertQuery(),
            Query::TYPE_UPDATE => $this->getDecoratedConnection()->updateQuery(),
            Query::TYPE_DELETE => $this->getDecoratedConnection()->deleteQuery(),
            default => throw new InvalidArgumentException(
                'Query type must be one of: `select`, `insert`, `update`, `delete`.'
            )
        };
    }
```

Ref 1: https://github.com/cakephp/phinx/blob/b0f4397dd57eb91bd5369c2770a4f2656a3f993c/src/Phinx/Db/Adapter/PdoAdapter.php#L239-L250
@dereuromark dereuromark merged commit 0480295 into cakephp:0.x Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants