Skip to content

Commit 616f9a6

Browse files
committed
Merge branch 'development'
2 parents 1c34cd1 + 858a3e1 commit 616f9a6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Result.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ public function fetch(string $class = null, mixed ...$constructor) : object | nu
132132
$class ??= $this->fetchClass;
133133
$constructor = $constructor ?: $this->fetchConstructor;
134134
if ($constructor) {
135+
// @phpstan-ignore-next-line
135136
return $this->result->fetch_object($class, $constructor);
136137
}
138+
// @phpstan-ignore-next-line
137139
return $this->result->fetch_object($class);
138140
}
139141

tests/DatabaseTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function testPrepare() : void
367367
PreparedStatement::class,
368368
static::$database->prepare('SELECT * FROM `t1` WHERE `c1` = ?')
369369
);
370-
$this->expectException(\mysqli_sql_exception::class);
370+
$this->expectException(mysqli_sql_exception::class);
371371
static::$database->prepare('FOO');
372372
}
373373

@@ -441,7 +441,7 @@ public function testTransactionRollback() : void
441441
});
442442
} catch (\Exception $exception) {
443443
$schema = \getenv('DB_SCHEMA');
444-
self::assertInstanceOf(\mysqli_sql_exception::class, $exception);
444+
self::assertInstanceOf(mysqli_sql_exception::class, $exception);
445445
self::assertSame("Table '{$schema}.t1000' doesn't exist", $exception->getMessage());
446446
}
447447
self::assertSame(7, static::$database->exec('SELECT * FROM `t1`'));
@@ -450,7 +450,7 @@ public function testTransactionRollback() : void
450450
public function testUse() : void
451451
{
452452
static::$database->use(\getenv('DB_SCHEMA')); // @phpstan-ignore-line
453-
$this->expectException(\mysqli_sql_exception::class);
453+
$this->expectException(mysqli_sql_exception::class);
454454
$this->expectExceptionMessage("Unknown database 'Foo'");
455455
static::$database->use('Foo');
456456
}
@@ -462,7 +462,7 @@ public function testErrors() : void
462462
self::assertNull(static::$database->error());
463463
try {
464464
static::$database->use('Bar');
465-
} catch (\mysqli_sql_exception) {
465+
} catch (mysqli_sql_exception) {
466466
//
467467
}
468468
self::assertSame([

0 commit comments

Comments
 (0)