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

StringSourceBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

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