diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 59126ad..0b39202 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -9,7 +9,7 @@ jobs: max-parallel: 15 matrix: operating-system: [ubuntu-latest] - php-versions: ['7.2', '7.3', '7.4', '8.0'] + php-versions: ['7.2', '7.3', '7.4', '8.0' ] name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: - name: Checkout diff --git a/src/AdvancedStatement.php b/src/AdvancedStatement.php index b736d7f..debdcc3 100644 --- a/src/AdvancedStatement.php +++ b/src/AdvancedStatement.php @@ -11,7 +11,7 @@ use FaaPz\PDO\Clause\JoinInterface; use FaaPz\PDO\Clause\LimitInterface; -abstract class AdvancedStatement extends AbstractStatement implements StatementInterface +abstract class AdvancedStatement extends AbstractStatement implements AdvancedStatementInterface { /** @var array $join */ protected $join = []; diff --git a/src/AdvancedStatementInterface.php b/src/AdvancedStatementInterface.php new file mode 100644 index 0000000..51d3ed1 --- /dev/null +++ b/src/AdvancedStatementInterface.php @@ -0,0 +1,44 @@ + $options + */ public function __construct(string $dsn, ?string $username = null, ?string $password = null, array $options = []); } diff --git a/src/Statement/SelectInterface.php b/src/Statement/SelectInterface.php index 3fa96c8..80d66e9 100644 --- a/src/Statement/SelectInterface.php +++ b/src/Statement/SelectInterface.php @@ -7,10 +7,10 @@ namespace FaaPz\PDO\Statement; -use FaaPz\PDO\StatementInterface; +use FaaPz\PDO\AdvancedStatementInterface; use FaaPz\PDO\Clause\ConditionalInterface; -interface SelectInterface extends StatementInterface +interface SelectInterface extends AdvancedStatementInterface { /** * @return self diff --git a/src/Statement/UpdateInterface.php b/src/Statement/UpdateInterface.php index feee46c..3ffa46d 100644 --- a/src/Statement/UpdateInterface.php +++ b/src/Statement/UpdateInterface.php @@ -7,10 +7,10 @@ namespace FaaPz\PDO\Statement; +use FaaPz\PDO\AdvancedStatementInterface; use FaaPz\PDO\Clause\RawInterface; -use FaaPz\PDO\StatementInterface; -interface UpdateInterface extends StatementInterface +interface UpdateInterface extends AdvancedStatementInterface { /** * @param string $table diff --git a/tests/Clause/ConditionalTest.php b/tests/Clause/ConditionalTest.php index 4b52e8c..fb5e1fe 100644 --- a/tests/Clause/ConditionalTest.php +++ b/tests/Clause/ConditionalTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Clause; use FaaPz\PDO\Clause\Conditional; use FaaPz\PDO\Clause\Method; diff --git a/tests/Clause/GroupingTest.php b/tests/Clause/GroupingTest.php index b4ec7a0..93069ac 100644 --- a/tests/Clause/GroupingTest.php +++ b/tests/Clause/GroupingTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Clause; use FaaPz\PDO\Clause\Conditional; use FaaPz\PDO\Clause\Grouping; diff --git a/tests/Clause/JoinTest.php b/tests/Clause/JoinTest.php index a5c323d..f72ec09 100644 --- a/tests/Clause/JoinTest.php +++ b/tests/Clause/JoinTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Clause; use FaaPz\PDO\Clause\Conditional; use FaaPz\PDO\Clause\Grouping; diff --git a/tests/Clause/LimitTest.php b/tests/Clause/LimitTest.php index 514a597..be6de4f 100644 --- a/tests/Clause/LimitTest.php +++ b/tests/Clause/LimitTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Clause; use FaaPz\PDO\Clause; use PHPUnit\Framework\TestCase; diff --git a/tests/Clause/MethodTest.php b/tests/Clause/MethodTest.php index 4875475..96c76cd 100644 --- a/tests/Clause/MethodTest.php +++ b/tests/Clause/MethodTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Clause; use FaaPz\PDO\Clause\Method; use FaaPz\PDO\Clause\Raw; diff --git a/tests/Clause/RawTest.php b/tests/Clause/RawTest.php index c3ab12f..3474fcc 100644 --- a/tests/Clause/RawTest.php +++ b/tests/Clause/RawTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Clause; use FaaPz\PDO\Clause\Raw; use PHPUnit\Framework\TestCase; diff --git a/tests/Statement/CallTest.php b/tests/Statement/CallTest.php index 5171bd2..5c8e306 100644 --- a/tests/Statement/CallTest.php +++ b/tests/Statement/CallTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Statement; use FaaPz\PDO\Clause; use FaaPz\PDO\Database; diff --git a/tests/Statement/DeleteTest.php b/tests/Statement/DeleteTest.php index 4fbc95e..2e3f5d2 100644 --- a/tests/Statement/DeleteTest.php +++ b/tests/Statement/DeleteTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Statement; use FaaPz\PDO\Clause\Conditional; use FaaPz\PDO\Clause\Join; diff --git a/tests/Statement/InsertTest.php b/tests/Statement/InsertTest.php index 070e8c2..3a1deb1 100644 --- a/tests/Statement/InsertTest.php +++ b/tests/Statement/InsertTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Statement; use FaaPz\PDO\Clause\Raw; use FaaPz\PDO\Database; diff --git a/tests/Statement/SelectTest.php b/tests/Statement/SelectTest.php index 0a33086..f8a4d75 100644 --- a/tests/Statement/SelectTest.php +++ b/tests/Statement/SelectTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Statement; use FaaPz\PDO\Clause\Conditional; use FaaPz\PDO\Clause\Join; diff --git a/tests/Statement/UpdateTest.php b/tests/Statement/UpdateTest.php index 19d037d..1fe4b1e 100644 --- a/tests/Statement/UpdateTest.php +++ b/tests/Statement/UpdateTest.php @@ -5,7 +5,7 @@ * @license http://opensource.org/licenses/MIT */ -namespace FaaPz\PDO\Test; +namespace FaaPz\PDO\Test\Statement; use FaaPz\PDO\Clause\Conditional; use FaaPz\PDO\Clause\Join;