ObjectIDsArray::filterValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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
}