Skip to content

Commit

Permalink
PHP 8.2 - Deprecated "Access to an undefined property PHPSQLParser\PH…
Browse files Browse the repository at this point in the history
…PSQLCreator::$created"
  • Loading branch information
DAdq26 authored Aug 23, 2023
1 parent 3e01cf7 commit 20d957e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/PHPSQLParser/PHPSQLCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*/

namespace PHPSQLParser;
use PHPSQLParser\builders\Builder;
use PHPSQLParser\exceptions\UnsupportedFeatureException;
use PHPSQLParser\builders\SelectStatementBuilder;
use PHPSQLParser\builders\DeleteStatementBuilder;
Expand All @@ -64,7 +65,8 @@
*
*/
class PHPSQLCreator {

private Builder $created;

public function __construct($parsed = false) {
if ($parsed) {
$this->create($parsed);
Expand All @@ -76,9 +78,9 @@ public function create($parsed) {
switch ($k) {

case 'UNION':
$builder = new UnionStatementBuilder();
$this->created = $builder->build($parsed);
break;
$builder = new UnionStatementBuilder();
$this->created = $builder->build($parsed);
break;
case 'UNION ALL':
$builder = new UnionAllStatementBuilder();
$this->created = $builder->build($parsed);
Expand Down

0 comments on commit 20d957e

Please sign in to comment.