Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Commit

Permalink
Refactor EncloseNames to be a trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
Metalaka committed Aug 4, 2015
1 parent fadd07e commit 282a727
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Query/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
*/
class Delete extends Where implements Dml
{
use EncloseNames;

/**
* Table name.
*
Expand Down
4 changes: 2 additions & 2 deletions Query/EncloseNames.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
namespace Hoa\Database\Query;

/**
* Abstract class \Hoa\Database\Query\EncloseNames.
* Trait \Hoa\Database\Query\EncloseNames.
*
* Enclose names feature.
*
* @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
abstract class EncloseNames
trait EncloseNames
{
/**
* State of the enclosing: Either true for enable the enclosing feature
Expand Down
4 changes: 3 additions & 1 deletion Query/Insert.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
* @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
class Insert extends EncloseNames implements Dml
class Insert implements Dml
{
use EncloseNames;

/**
* Source.
*
Expand Down
2 changes: 2 additions & 0 deletions Query/SelectCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
*/
abstract class SelectCore extends Where
{
use EncloseNames;

/**
* Columns.
*
Expand Down
2 changes: 2 additions & 0 deletions Query/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
*/
class Update extends Where implements Dml
{
use EncloseNames;

/**
* Table.
*
Expand Down
2 changes: 1 addition & 1 deletion Query/Where.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
class Where extends EncloseNames
class Where
{
/**
* Expressions.
Expand Down

0 comments on commit 282a727

Please sign in to comment.