Skip to content

Commit

Permalink
Merge pull request #202 from nextras/dependabot/composer/phpstan/phps…
Browse files Browse the repository at this point in the history
…tan-strict-rules-1.5.1

build(deps-dev): update phpstan/phpstan-strict-rules requirement from 1.4.5 to 1.5.1
  • Loading branch information
hrach committed Apr 4, 2023
2 parents e65f1cf + 6cd1272 commit 7df2b5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"phpstan/extension-installer": "1.2.0",
"phpstan/phpstan": "1.10.10",
"phpstan/phpstan-deprecation-rules": "1.1.3",
"phpstan/phpstan-strict-rules": "1.4.5",
"phpstan/phpstan-strict-rules": "1.5.1",
"symfony/config": "~4.4 || ~5.0",
"symfony/dependency-injection": "~4.4 || ~5.0",
"symfony/http-kernel": "~4.4 || ~5.0",
Expand Down
2 changes: 0 additions & 2 deletions src/Utils/FileImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public static function executeFile(IConnection $connection, string $file): int
} else {
preg_match('(' . preg_quote($delimiter) . "\\s*|$parse)", $query, $match, PREG_OFFSET_CAPTURE, $offset); // should always match
$found = $match[0][0];
/** @var int $offset */
$offset = $match[0][1] + strlen($found);

if (strlen($found) === 0 && rtrim($query) === '') {
Expand All @@ -75,7 +74,6 @@ public static function executeFile(IConnection $connection, string $file): int
} else { // find matching quote or comment end
while (preg_match('(' . ($found === '/*' ? '\*/' : ($found === '[' ? ']' : (preg_match('~^-- |^#~', $found) === 1 ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', $query, $match, PREG_OFFSET_CAPTURE, $offset) === 1) { //! respect sql_mode NO_BACKSLASH_ESCAPES
$s = $match[0][0];
/** @var int $offset */
$offset = $match[0][1] + strlen($s);
if ($s[0] !== '\\') {
break;
Expand Down

0 comments on commit 7df2b5e

Please sign in to comment.