Passed
Push — master ( b4e3f0...d6a119 )
by Robbie
04:16 queued 02:31
created

Captures/SearchManipulateCapture_MySQLDatabase.php (1 issue)

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
/**
9
 * @deprecated 3.1...4.0 Please use tractorcow/silverstripe-proxy-db to proxy the database connector instead
10
 */
11
12
class SearchManipulateCapture_MySQLDatabase extends MySQLDatabase
13
{
14
15
    public $isManipulationCapture = true;
16
17
    public function manipulate($manipulation)
18
    {
19
        $res = parent::manipulate($manipulation);
0 ignored issues
show
Are you sure the assignment to $res is correct as parent::manipulate($manipulation) targeting 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...
20
        SearchUpdater::handle_manipulation($manipulation);
21
        return $res;
22
    }
23
}
24