for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kunstmaan\MediaBundle\AdminList\ItemAction;
use Kunstmaan\AdminListBundle\AdminList\ItemAction\ItemActionInterface;
class MediaDeleteItemAction implements ItemActionInterface
{
/**
* @var string
*/
private $redirectUrl;
* @param string $redirectUrl
public function __construct($redirectUrl)
$this->redirectUrl = $redirectUrl;
}
* @param mixed $item
*
* @return array
array<string,string|array>
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
public function getUrlFor($item)
return array(
'path' => 'KunstmaanMediaBundle_media_delete',
'params' => array('mediaId' => $item->getId(), 'redirectUrl' => $this->redirectUrl),
);
* @return string
public function getLabelFor($item)
return 'Delete';
public function getIconFor($item)
return 'remove-sign';
string|null
This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.
@return
public function getTemplate()
return null;
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.