Passed
Push — master ( f8f76e...e5015c )
by Bas
12:29
created

HasDocumentFunctions   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 13
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A merge() 0 3 1
1
<?php
2
3
namespace LaravelFreelancerNL\FluentAQL\AQL;
4
5
use LaravelFreelancerNL\FluentAQL\Expressions\FunctionExpression;
6
7
/**
8
 * Geo AQL functions.
9
 *
10
 * @see https://www.arangodb.com/docs/stable/aql/functions-geo.html
11
 */
12
trait HasDocumentFunctions
13
{
14
    /**
15
     * Calculate the distance between two coordinates with the Haversine formula.
16
     *
17
     * @link https://www.arangodb.com/docs/stable/aql/functions-document.html#merge
18
     *
19
     * @param  array  $documents
20
     * @return FunctionExpression
21
     */
22 2
    public function merge(...$documents)
23
    {
24 2
        return new FunctionExpression('MERGE', $documents);
25
    }
26
}
27