Skip to content

Commit

Permalink
manual fixes for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dpi committed Mar 8, 2021
1 parent 9c2667d commit 830cfd2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix">
<exclude-pattern>src/Purl/AbstractPart.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint">
<!-- Ignore typed property sniff since we need to support PHP 7.2 -->
<exclude-pattern>tests/Purl/Test/ParserTest.php</exclude-pattern>
</rule>
</ruleset>
4 changes: 2 additions & 2 deletions src/Purl/AbstractPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public function __get(string $key)
/**
* @param mixed $value
*/
public function __set(string $key, $value): AbstractPart
public function __set(string $key, $value): void
{
return $this->set($key, $value);
$this->set($key, $value);
}

public function __unset(string $key): void
Expand Down
3 changes: 2 additions & 1 deletion tests/Purl/Test/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

class ParserTest extends TestCase
{
private Parser $parser;
/** @var Parser */
private $parser;

protected function setUp(): void
{
Expand Down

0 comments on commit 830cfd2

Please sign in to comment.