AddFields   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getExpression() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ODM\MongoDB\Aggregation\Stage;
6
7
/**
8
 * Fluent interface for adding a $addFields stage to an aggregation pipeline.
9
 */
10
final class AddFields extends Operator
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 2
    public function getExpression() : array
16
    {
17
        return [
18 2
            '$addFields' => $this->expr->getExpression(),
19
        ];
20
    }
21
}
22