Skip to content

Commit

Permalink
[pdosqlexec] Using traits (#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
siad007 authored Aug 24, 2021
1 parent 4a341e6 commit bedd05c
Showing 1 changed file with 5 additions and 32 deletions.
37 changes: 5 additions & 32 deletions src/Phing/Task/System/Pdo/PDOSQLExecTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
use Phing\Io\Reader;
use Phing\Project;
use Phing\Task\System\Condition\Condition;
use Phing\Type\FileList;
use Phing\Type\FileSet;
use Phing\Type\Element\FileListAware;
use Phing\Type\Element\FileSetAware;

/**
* Executes a series of SQL statements on a database using PDO.
Expand Down Expand Up @@ -64,6 +64,9 @@
*/
class PDOSQLExecTask extends PDOTask implements Condition
{
use FileListAware;
use FileSetAware;

public const DELIM_ROW = 'row';
public const DELIM_NORMAL = 'normal';
public const DELIM_NONE = 'none';
Expand All @@ -88,20 +91,6 @@ class PDOSQLExecTask extends PDOTask implements Condition
*/
private $conn;

/**
* Files to load.
*
* @var FileSet[]
*/
private $filesets = [];

/**
* Files to load.
*
* @var FileList[]
*/
private $filelists = [];

/**
* Formatter elements.
*
Expand Down Expand Up @@ -206,22 +195,6 @@ public function addText($sql): void
$this->sqlCommand .= $sql;
}

/**
* Adds a set of files (nested fileset attribute).
*/
public function addFileset(FileSet $set): void
{
$this->filesets[] = $set;
}

/**
* Adds a set of files (nested filelist attribute).
*/
public function addFilelist(FileList $list): void
{
$this->filelists[] = $list;
}

/**
* Creates a new PDOSQLExecFormatterElement for <formatter> element.
*
Expand Down

0 comments on commit bedd05c

Please sign in to comment.