Completed
Pull Request — develop (#6)
by Martin
06:50 queued 04:07
created

ArrayToJson   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A customiseFunction() 0 5 1
1
<?php
2
3
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions;
4
5
/**
6
 * Implementation of PostgreSql ARRAY_TO_JSON()
7
 * @see https://www.postgresql.org/docs/9.6/static/functions-json.html
8
 *
9
 * @since 0.10
10
 * @author Martin Georgiev <[email protected]>
11
 */
12
class ArrayToJson extends AbstractFunction
13
{
14
    protected function customiseFunction()
15
    {
16
        $this->setFunctionPrototype('array_to_json(%s)');
17
        $this->addLiteralMapping('StringPrimary');
18
    }
19
}
20