Skip to content

Commit d904e7e

Browse files
authored
Fix remaining psalm errors
1 parent 5724968 commit d904e7e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/FakePdoStatementTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public function fetch(
393393
*/
394394
public function fetchColumn($column = 0)
395395
{
396-
/** @var array|false $row */
396+
/** @var array<int, scalar>|false $row */
397397
$row = $this->fetch(\PDO::FETCH_NUM);
398398
if ($row === false) {
399399
return $row;

src/Processor/Expression/FunctionEvaluator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ private static function sqlSubstringIndex(
587587
$delim = (string) Evaluator::evaluate($conn, $scope, $delimiter, $row, $result);
588588
$pos = $args[2];
589589

590-
if ($pos !== null) {
590+
if ($pos !== null && $delim !== '') {
591591
$count = (int) Evaluator::evaluate($conn, $scope, $pos, $row, $result);
592592
$parts = \explode($delim, $string);
593593

src/Schema/TableDefinition.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TableDefinition
2929
public $columns;
3030

3131
/**
32-
* @var array
32+
* @var array<string>
3333
*/
3434
public $primaryKeyColumns;
3535

@@ -46,6 +46,7 @@ class TableDefinition
4646
/**
4747
* @param array<string, Column> $columns
4848
* @param array<string, Index> $indexes
49+
* @param array<string> $primaryKeyColumns
4950
*/
5051
public function __construct(
5152
string $name,

0 commit comments

Comments
 (0)