Passed
Push — master ( cc7610...88ef28 )
by Bas
02:54
created

HasDocumentFunctions::merge()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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
    public function merge(...$documents)
23
    {
24
        return new FunctionExpression('MERGE', $documents);
25
    }
26
}
27