Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace Rector\TypeDeclaration\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixture;

interface RespectInterface
{
/**
* @return string
*/
public function toString(): string;
}

class Respect implements RespectInterface
{
/**
* @return string
*/
public function toString(): string
{
throw new \RuntimeException('This method returns void but the return type hint has to remain "string".');
}
}

?>
-----
<?php

namespace Rector\TypeDeclaration\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixture;

interface RespectInterface
{
/**
* @return string
*/
public function toString(): string;
}

class Respect implements RespectInterface
{
/**
* @return string
*/
public function toString(): string
{
throw new \RuntimeException('This method returns void but the return type hint has to remain "string".');
}
}


?>