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

StringContent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A empty() 0 3 1
A __toString() 0 3 1
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