Completed
Push — master ( d2d838...15d122 )
by Lars
03:19
created

ActiveRecordExpressions   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
1
<?php
2
3
namespace voku\db;
4
5
use Arrayy\Arrayy;
6
7
/**
8
 * Class Expressions, part of SQL.
9
 * Every SQL can be split into multiple expressions.
10
 * Each expression contains three parts:
11
 *
12
 * @property string|ActiveRecordExpressions $source   of this expression, (option)
13
 * @property string                         $operator (required)
14
 * @property string|ActiveRecordExpressions $target   of this expression (required)
15
 * Just implement one function __toString.
16
 */
17
class ActiveRecordExpressions extends Arrayy
18
{
19
  public function __toString()
20
  {
21
    return $this->source . ' ' . $this->operator . ' ' . $this->target;
22
  }
23
}
24