for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Psr7Unitesting\Utils;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\StreamInterface;
use Symfony\Component\DomCrawler\Crawler;
class Exporter
{
/**
* @param string $expected
$expected
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
*/
public function export($value)
if ($value instanceof ServerRequestInterface) {
return 'ServerRequest instance';
}
if ($value instanceof RequestInterface) {
return 'Request instance';
if ($value instanceof ResponseInterface) {
return 'Response instance';
if ($value instanceof StreamInterface) {
return 'Stream instance';
if ($value instanceof UriInterface) {
return 'Uri instance';
if ($value instanceof Crawler) {
return 'Html content';
if (is_object($value)) {
return get_class($value);
return gettype($value);
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.