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

Expression::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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