Completed
Push — master ( 7da46b...c54c56 )
by José
13s
created

Expression   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 33
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
A from() 0 4 1
1
<?php
2
3
namespace Phinx\Util;
4
5
class Expression
6
{
7
    /**
8
     * @var string The expression
9
     */
10
    private $value;
11
12
    /**
13
     * @param string $value The expression
14
     */
15
    public function __construct($value)
16
    {
17
        $this->value = $value;
18
    }
19
20
    /**
21
     * @return string Returns the expression
22
     */
23
    public function __toString()
24
    {
25
        return $this->value;
26
    }
27
28
    /**
29
     * @param string $value The expression
30
     *
31
     * @return self
32
     */
33
    public static function from($value)
34
    {
35
        return new self($value);
36
    }
37
}
38