Skip to content

Commit

Permalink
Merge pull request #81 from adaamz/phpstan-update-bleeding-edge
Browse files Browse the repository at this point in the history
Phpstan update + bleeding edge rules
  • Loading branch information
hrach committed Jul 13, 2019
2 parents 0271fdd + 8eab33a commit f19a317
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
includes:
- phar://%rootDir%/phpstan.phar/conf/bleedingEdge.neon

parameters:
ignoreErrors:
- '#(sqlsrv|SQLSRV).+ not found\.#i'

# never type is not supported: https://github.com/phpstan/phpstan/issues/2297
earlyTerminatingMethodCalls:
Nextras\Dbal\SqlProcessor:
- throwInvalidValueTypeException
- throwWrongModifierException
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"nette/utils": "~2.5 || ~3.0",
"nette/finder": "~2.5 || ~3.0@rc",
"nette/neon": "~2.4 || ~3.0",
"phpstan/phpstan-shim": "0.11.1",
"phpstan/phpstan-shim": "0.11.12",
"tracy/tracy": "~2.4"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Drivers/Mysqli/MysqliDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public function modifyLimitQuery(string $query, ?int $limit, ?int $offset): stri
* This method is based on Doctrine\DBAL project.
* @link www.doctrine-project.org
*/
protected function createException($error, $errorNo, $sqlState, $query = null)
protected function createException($error, int $errorNo, $sqlState, $query = null)
{
if (in_array($errorNo, [1216, 1217, 1451, 1452, 1701], true)) {
return new ForeignKeyConstraintViolationException($error, $errorNo, $sqlState, null, $query);
Expand Down

0 comments on commit f19a317

Please sign in to comment.