From 1bd5e380086adcaacf68e637189891e5e46e1506 Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Wed, 24 Jan 2024 15:38:02 -0300 Subject: [PATCH] Remove writeFormatted from MagiQL --- system/MagiQL/Builder.php | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/system/MagiQL/Builder.php b/system/MagiQL/Builder.php index f404c12..261f46d 100644 --- a/system/MagiQL/Builder.php +++ b/system/MagiQL/Builder.php @@ -35,21 +35,6 @@ class Builder implements \Phacil\Framework\MagiQL\Api\BuilderInterface */ protected $whereWriter; - /** - * The SQL formatter. - * - * @var \NilPortugues\Sql\QueryFormatter\Formatter - */ - protected $sqlFormatter; - - /** - * Class namespace for the query pretty output formatter. - * Required to create the instance only if required. - * - * @var string - */ - protected $sqlFormatterClass = 'NilPortugues\Sql\QueryFormatter\Formatter'; - /** * Array holding the writers for each query part. Methods are called upon request and stored in * the $queryWriterInstances array. @@ -187,22 +172,6 @@ class Builder implements \Phacil\Framework\MagiQL\Api\BuilderInterface return $this->placeholderWriter->get(); } - /** - * Returns a SQL string in a readable human-friendly format. - * - * @param QueryInterface $query - * - * @return string - */ - public function writeFormatted(QueryInterface $query) - { - if (null === $this->sqlFormatter) { - $this->sqlFormatter = (new \ReflectionClass($this->sqlFormatterClass))->newInstance(); - } - - return $this->sqlFormatter->format($this->write($query)); - } - /** * @param QueryInterface $query * @param bool $resetPlaceholders