Skip to content

Commit

Permalink
Merge pull request #25 from dschoenbauer/develop
Browse files Browse the repository at this point in the history
v1.1.1
  • Loading branch information
dschoenbauer committed May 24, 2017
2 parents 373451c + 08cee3f commit 394f654
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @author David Schoenbauer
*/
trait ErrorTrait
abstract class AbstractCommand implements CommandInterface
{

private $isStrict = false;
Expand Down
3 changes: 1 addition & 2 deletions src/Sql/Command/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@
* @author David Schoenbauer <[email protected]>
* @since v1.0.0
*/
class Create implements CommandInterface
class Create extends AbstractCommand
{

use ErrorTrait;

private $table;
private $data;
Expand Down
3 changes: 1 addition & 2 deletions src/Sql/Command/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
*
* @author David Schoenbauer <[email protected]>
*/
class Delete implements CommandInterface
class Delete extends AbstractCommand
{

private $table;

use ErrorTrait;
use WhereTrait;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Sql/Command/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* retrieves data from a PDO connected resource
* @author David Schoenbauer <[email protected]>
*/
class Select implements CommandInterface
class Select extends AbstractCommand
{

private $table;
Expand All @@ -45,7 +45,6 @@ class Select implements CommandInterface
private $fetchFlat = false;
private $defaultValue = [];

use ErrorTrait;
use WhereTrait;

/**
Expand Down Expand Up @@ -73,6 +72,7 @@ public function __construct(
) {



$this->setTable($table)
->setFields($fields)
->setFetchStyle($fetchStyle)
Expand Down
3 changes: 1 addition & 2 deletions src/Sql/Command/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@
* @author David Schoenbauer <[email protected]>
* @since v1.0.0
*/
class Update implements CommandInterface
class Update extends AbstractCommand
{

private $table;
private $data = [];

use ErrorTrait;
use WhereTrait;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author David Schoenbauer
*/
class ErrorTraitTest extends TestCase
class AbstractCommandTest extends TestCase
{

/**
Expand All @@ -26,7 +26,7 @@ class ErrorTraitTest extends TestCase

protected function setUp()
{
$this->object = $this->getMockForTrait(ErrorTrait::class);
$this->object = $this->getMockForAbstractClass(AbstractCommand::class);
}

public function testIsStrict()
Expand Down

0 comments on commit 394f654

Please sign in to comment.