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

CollectionContent::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates\Content;
4
5
use League\Plates\Content;
6
7
class CollectionContent implements Content
8
{
9
    private $parts;
10
11
    public function __construct(array $parts) {
12
        $this->parts = $parts;
13
    }
14
15
    public function __toString() {
16
        return array_reduce($this->parts, function($acc, $part) {
17
            return $acc . $part;
18
        }, '');
19
    }
20
}
21