This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
10
{
11
public function writeHeader()
12
{
13
header('Content-Type: text/xml');
14
}
15
16
public function writeOutput(ServiceAbstract $instance)
The expression (new \ByJG\Serializer\Fo...->process($serialized); of type string|false adds false to the return on line 20 which is incompatible with the return type declared by the interface ByJG\RestServer\HandleOu...tInterface::writeOutput of type string. It seems like you forgot to handle an error condition.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.