Skip to content

Commit 1548798

Browse files
committed
PHPstan leven 5
Signed-off-by: Jan Henckens <jan@henckens.be>
1 parent 2e8c6de commit 1548798

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ includes:
22
- vendor/craftcms/phpstan/phpstan.neon
33

44
parameters:
5-
level: 4
5+
level: 5
66
paths:
77
- src

src/services/NodesService.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,7 @@ public function move(NodeModel $node, $parent, $previousId)
324324
{
325325
/** @var NodeRecord $record */
326326
$record = NodeRecord::findOne(['id' => $node->id]);
327-
if ($record === null) {
328-
return false;
329-
}
330-
327+
331328
$record->parent = $parent;
332329
$currentOrder = 0;
333330

src/variables/NavigateVariable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class NavigateVariable
3535
* @return mixed
3636
* @throws \craft\errors\SiteNotFoundException
3737
*/
38-
public function raw($navHandle, $siteId = null)
38+
public function raw($navHandle, int $siteId = null)
3939
{
40-
if ($siteId === null) {
40+
if (!$siteId) {
4141
$site = Craft::$app->getSites()->getSiteById($siteId);
4242
if (!$site) {
4343
$siteId = Craft::$app->sites->getCurrentSite()->id;

0 commit comments

Comments
 (0)