Issues (49)

tests/Extension/ProxyDBExtensionTest.php (2 issues)

1
<?php
2
3
namespace LeKoala\DebugBar\Test\Extension;
4
5
use SilverStripe\Dev\SapphireTest;
6
use SilverStripe\ORM\DB;
7
use LeKoala\DebugBar\Extension\ProxyDBExtension;
8
9
class ProxyDBExtensionTest extends SapphireTest
10
{
11
    /**
12
     * @var SilverStripe\ORM\Connect\Database
0 ignored issues
show
The type LeKoala\DebugBar\Test\Ex...pe\ORM\Connect\Database was not found. Did you mean SilverStripe\ORM\Connect\Database? If so, make sure to prefix the type with \.
Loading history...
13
     */
14
    protected $conn;
15
16
    public function setUp(): void
17
    {
18
        parent::setUp();
19
        $this->conn = DB::get_conn();
0 ignored issues
show
Documentation Bug introduced by
It seems like SilverStripe\ORM\DB::get_conn() of type SilverStripe\ORM\Connect\Database is incompatible with the declared type LeKoala\DebugBar\Test\Ex...pe\ORM\Connect\Database of property $conn.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
20
    }
21
22
    public function testQueriesAreCollected()
23
    {
24
        $this->assertNotEmpty(ProxyDBExtension::getQueries());
25
        ProxyDBExtension::resetQueries();
26
    }
27
}
28