Skip to content

Commit 88b086c

Browse files
committed
Reaching PHPStan level 3
1 parent af99491 commit 88b086c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: 2
2+
level: 3
33
inferPrivatePropertyTypeFromConstructor: true
44
ignoreErrors:
55
- "#Mouf\\\\MoufManager#"

src/Mouf/Database/QueryWriter/QueryResult.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ public function sort($key, $direction = SortableInterface::ASC)
133133
*
134134
* @param string $key
135135
*
136-
* @return NodeInterface
136+
* @return NodeInterface|null
137137
*/
138-
private function findColumnByKey($key)
138+
private function findColumnByKey($key): ?NodeInterface
139139
{
140140
$columns = $this->select->getColumns();
141141
foreach ($columns as $column) {
@@ -152,6 +152,6 @@ private function findColumnByKey($key)
152152
}
153153
}
154154

155-
return;
155+
return null;
156156
}
157157
}

src/SQLParser/Node/LimitNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function toSql(array $parameters, AbstractPlatform $platform, $indent = 0
9898
}
9999

100100
if (is_numeric($this->value)) {
101-
return (int) $this->value;
101+
return (string) ((int) $this->value);
102102
} elseif (empty($this->value)) {
103103
return null;
104104
} else {

0 commit comments

Comments
 (0)