Completed
Push — master ( 301842...97cd9f )
by Sam
04:27 queued 02:02
created

StringSourceBuilder::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\GraphQL\Language;
4
5
class StringSourceBuilder implements SourceBuilderInterface
6
{
7
8
    /**
9
     * @var string
10
     */
11
    private $body;
12
13
    /**
14
     * StringSourceBuilder constructor.
15
     * @param string $body
16
     */
17
    public function __construct(string $body)
18
    {
19
        $this->body = $body;
20
    }
21
22
    /**
23
     * @inheritdoc
24
     */
25
    public function build(): Source
26
    {
27
        return new Source($this->body);
28
    }
29
}
30