Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Libero/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
<properties>
Expand Down
21 changes: 21 additions & 0 deletions tests/cases/php/nullable-type
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---DESCRIPTION---
Must use nullable types
---CONTENTS---
<?php

declare(strict_types=1);

function foo(Bar $baz = null, int $qux = null) : void
{
}

---FIXED---
<?php

declare(strict_types=1);

function foo(?Bar $baz = null, ?int $qux = null) : void
{
}

---