ObjectIDsArray   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A filterValue() 0 4 1
1
<?php
2
/**
3
 * Spiral, Core Components
4
 *
5
 * @author Wolfy-J
6
 */
7
8
namespace Spiral\ODM\Accessors;
9
10
use Spiral\ODM\ODM;
11
12
/**
13
 * Provides ability to store array of MongoId (ObjectID).
14
 *
15
 * Attention, array will be saved as one big $set operation in case when multiple atomic
16
 * operations applied to it (not supported by Mongo).
17
 */
18
class ObjectIDsArray extends AbstractArray
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function filterValue($value)
24
    {
25
        return ODM::mongoID($value);
26
    }
27
}