diff --git a/src/SelectQuery.php b/src/SelectBuilder.php similarity index 90% rename from src/SelectQuery.php rename to src/SelectBuilder.php index 7dd96c4..342048a 100644 --- a/src/SelectQuery.php +++ b/src/SelectBuilder.php @@ -1,7 +1,7 @@ processClauseList([ self::PRE_QUERY_COMMENT => $this->preQuery(), @@ -17,7 +17,7 @@ public function __toString():string { ]); } - /** @return string[]|SqlQuery[] */ + /** @return string[]|SqlBuilder[] */ public function select():array { return []; } diff --git a/src/SqlQuery.php b/src/SqlBuilder.php similarity index 98% rename from src/SqlQuery.php rename to src/SqlBuilder.php index 17d4011..1536c7e 100644 --- a/src/SqlQuery.php +++ b/src/SqlBuilder.php @@ -4,7 +4,7 @@ use Gt\SqlBuilder\Condition\AndCondition; use Gt\SqlBuilder\Condition\Condition; -abstract class SqlQuery { +abstract class SqlBuilder { const PRE_QUERY_COMMENT = "/* preQuery */"; const POST_QUERY_COMMENT = "/* postQuery */"; const WHERE_CLAUSES = ["where", "having"]; diff --git a/test/ExampleSelect.php b/test/ExampleSelect.php index 0668d70..b8009f4 100644 --- a/test/ExampleSelect.php +++ b/test/ExampleSelect.php @@ -1,7 +1,7 @@ select()); self::assertEmpty($sut->from()); self::assertEmpty($sut->where()); @@ -20,7 +20,7 @@ public function testDefaults() { } public function testToStringEmpty() { - $sut = self::getMockForAbstractClass(SelectQuery::class); + $sut = self::getMockForAbstractClass(SelectBuilder::class); self::assertEmpty((string)$sut); } } \ No newline at end of file diff --git a/test/unit/SqlQueryTest.php b/test/unit/SqlBuilderTest.php similarity index 58% rename from test/unit/SqlQueryTest.php rename to test/unit/SqlBuilderTest.php index d9b5c31..53aaf85 100644 --- a/test/unit/SqlQueryTest.php +++ b/test/unit/SqlBuilderTest.php @@ -1,14 +1,14 @@ preQuery()); self::assertEquals("", $sut->postQuery()); }