Completed
Push — v4.0 ( 3a8f05...488a49 )
by
unknown
03:09
created

StringContent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates\Content;
4
5
use League\Plates\Content;
6
7
class StringContent implements Content
8
{
9
    private $content;
10
11
    public function __construct($content) {
12
        $this->content = $content;
13
    }
14
15
    public static function empty() {
16
        return new self('');
17
    }
18
19
    public function __toString() {
20
        return (string) $this->content;
21
    }
22
}
23