diff --git a/src/generators/sql/SQLGenerator.php b/src/generators/sql/SQLGenerator.php index 139eee4..17c42c9 100644 --- a/src/generators/sql/SQLGenerator.php +++ b/src/generators/sql/SQLGenerator.php @@ -10,7 +10,7 @@ /** * Class SQLGenerator - * @package CottaCush\Cricket\Report\Generators + * @package CottaCush\Cricket\Generators\SQL * @author Taiwo Ladipo * @author Olawale Lawal */ diff --git a/src/generators/sql/SQLQueryBuilder.php b/src/generators/sql/SQLQueryBuilder.php index 2988771..b1cf326 100644 --- a/src/generators/sql/SQLQueryBuilder.php +++ b/src/generators/sql/SQLQueryBuilder.php @@ -6,7 +6,7 @@ /** * Class SQLQueryBuilder - * @package CottaCush\Cricket\Report\Generators + * @package CottaCush\Cricket\Generators\SQL * @author Taiwo Ladipo * @author Olawale Lawal */ diff --git a/src/generators/sql/SQLQueryBuilderParser.php b/src/generators/sql/SQLQueryBuilderParser.php index 3b4eb36..1a4508a 100644 --- a/src/generators/sql/SQLQueryBuilderParser.php +++ b/src/generators/sql/SQLQueryBuilderParser.php @@ -18,15 +18,14 @@ class SQLQueryBuilderParser /** * @author Olawale Lawal * @param CricketQueryableInterface $report - * @param array $data * @param array $placeholderValues * @param null $db * @param string $function - * @throws \CottaCush\Cricket\Report\Exceptions\SQLReportGenerationException + * @return array + * @throws \CottaCush\Cricket\Exceptions\SQLQueryGenerationException */ public function parse( CricketQueryableInterface $report, - &$data = [], $placeholderValues = [], $db = null, $function = SQLGenerator::QUERY_ALL @@ -36,6 +35,7 @@ public function parse( $this->hasInputPlaceholders = $queryObj->hasInputPlaceholders(); $this->query = $queryObj->getQuery(); + $data = []; if (!$this->hasInputPlaceholders) { // Report has only session placeholders or none $shouldReplacePlaceholders = true; @@ -61,6 +61,8 @@ public function parse( $data = $generator->generateResult($function); } } + + return $data; } public function arePlaceholdersReplaced() diff --git a/src/interfaces/CricketQueryableInterface.php b/src/interfaces/CricketQueryableInterface.php index fc2d3ed..a42ccd2 100644 --- a/src/interfaces/CricketQueryableInterface.php +++ b/src/interfaces/CricketQueryableInterface.php @@ -5,6 +5,7 @@ /** * Interface CricketQueryableInterface * @package CottaCush\Cricket\Interfaces + * @property string type */ interface CricketQueryableInterface {