Completed
Pull Request — develop (#12)
by
unknown
03:19 queued 45s
created

FullTextSearch   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 6
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A serialize() 0 3 1
A parseValue() 0 3 1
A parseLiteral() 0 3 1
1
<?php
2
3
namespace DeInternetJongens\LighthouseUtils\Schema\Scalars;
4
5
use GraphQL\Type\Definition\ScalarType;
6
7
class FullTextSearch extends ScalarType
8
{
9
    public $name = 'FullTextSearch';
10
11
    public $description = 'To enable fulltext searching on a type';
12
13
    public function serialize($value)
14
    {
15
        return $value;
16
    }
17
18
    public function parseValue($value)
19
    {
20
        return $value;
21
    }
22
23
    public function parseLiteral($valueNode, array $variables = null)
24
    {
25
        return $this->parseValue($valueNode->value);
26
    }
27
}
28