Completed
Push — master ( 8deccf...0fd7bd )
by
unknown
02:07
created

manipulate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace SilverStripe\FullTextSearch\Search\Captures;
4
5
use SilverStripe\ORM\Connect\MySQLDatabase;
6
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
7
8
class SearchManipulateCapture_MySQLDatabase extends MySQLDatabase
9
{
10
11
    public $isManipulationCapture = true;
12
13
    public function manipulate($manipulation)
14
    {
15
        $res = parent::manipulate($manipulation);
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $res is correct as parent::manipulate($manipulation) (which targets SilverStripe\ORM\Connect\Database::manipulate()) seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
16
        SearchUpdater::handle_manipulation($manipulation);
17
        return $res;
18
    }
19
}
20