GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

BatchUpdate   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A update() 0 15 1
1
<?php
2
3
/**
4
 * This file is part of the PHPMongo package.
5
 *
6
 * (c) Dmytro Sokil <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sokil\Mongo;
13
14
class BatchUpdate extends BatchOperation
15
{
16
    protected $batchClass = '\MongoUpdateBatch';
17
18
    /**
19
     * @param Expression|array|callable $expression expression to define
20
     * @param Operator|array|callable $data new data or operators to update
21
     * @param bool|false $multiple
22
     * @param bool|false $upsert
23
     * @return $this
24
     */
25
    public function update(
26
        $expression,
27
        $data,
28
        $multiple = false,
29
        $upsert = false
30
    ) {
31
        $this->add(array(
32
            'q'         => Expression::convertToArray($expression),
33
            'u'         => Operator::convertToArray($data),
34
            'multiple'  => $multiple,
35
            'upsert'    => $upsert,
36
        ));
37
38
        return $this;
39
    }
40
}
41