Skip to content

Commit

Permalink
fix: phpstan error for string('column', 'MAX')
Browse files Browse the repository at this point in the history
  • Loading branch information
taka-oyama committed Jun 24, 2024
1 parent 1c2a1ed commit aba4424
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ parameters:
- message: "#^Cannot access offset 'requestTag' on mixed\\.$#"
count: 1
path: src/Connection.php
- message: "#^Parameter \\#2 \\$length of method Illuminate\\\\Database\\\\Schema\\\\Blueprint\\:\\:string\\(\\) expects int\\|null, int\\|string\\|null given\\.$#"
count: 1
path: src/Schema/Blueprint.php
9 changes: 9 additions & 0 deletions src/Schema/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ public function tinyIncrements($column)
return $this->increments($column);
}

/**
* @inheritDoc
* @param int|'max'|null $length add support for 'max'
*/
public function string($column, $length = null)
{
return parent::string($column, $length);
}

/**
* @inheritDoc
* @return UuidColumnDefinition
Expand Down

0 comments on commit aba4424

Please sign in to comment.