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::update()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

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