Skip to content

Commit 364ea97

Browse files
committed
apply code review suggestions
1 parent d1c7370 commit 364ea97

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

tests/system/Database/Live/SQLSRV/GetFieldDataTestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace CodeIgniter\Database\Live\SQLSRV;
1515

1616
use CodeIgniter\Database\Live\AbstractGetFieldDataTestCase;
17+
use CodeIgniter\Database\SQLSRV\Connection;
1718
use Config\Database;
1819
use PHPUnit\Framework\Attributes\DataProvider;
1920
use PHPUnit\Framework\Attributes\Group;
@@ -240,6 +241,8 @@ public function testGetFieldDataType(): void
240241
#[DataProvider('provideNormalizeDefault')]
241242
public function testNormalizeDefault(?string $input, ?string $expected): void
242243
{
244+
$this->assertInstanceOf(Connection::class, $this->db);
245+
243246
$normalizeDefault = self::getPrivateMethodInvoker($this->db, 'normalizeDefault');
244247
$this->assertSame($expected, $normalizeDefault($input));
245248
}
@@ -284,6 +287,7 @@ public static function provideNormalizeDefault(): iterable
284287
// Edge cases
285288
'multiple nested parentheses' => ["((('nested')))", 'nested'],
286289
'value without parentheses' => ['plain_value', 'plain_value'],
290+
'value with parentheses' => ['( plain_value )', 'plain_value'],
287291
'function with parameters' => ['(complex_func(1, 2))', 'complex_func(1, 2)'],
288292
];
289293
}

utils/phpstan-baseline/deadCode.unreachable.neon

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
# total 2 errors
1+
# total 1 error
22

33
parameters:
44
ignoreErrors:
5-
-
6-
message: '#^Unreachable statement \- code above always terminates\.$#'
7-
count: 1
8-
path: ../../tests/system/Database/Live/SQLSRV/GetFieldDataTestCase.php
9-
105
-
116
message: '#^Unreachable statement \- code above always terminates\.$#'
127
count: 1

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 2837 errors
1+
# total 2836 errors
22
includes:
33
- argument.type.neon
44
- assign.propertyType.neon

0 commit comments

Comments
 (0)