for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\Html\Elements;
use Spatie\Html\BaseElement;
use Spatie\Html\Elements\Attributes\Autofocus;
use Spatie\Html\Elements\Attributes\Name;
use Spatie\Html\Elements\Attributes\Required;
class File extends BaseElement
{
use Autofocus;
use Name;
use Required;
protected $tag = 'input';
const ACCEPT_AUDIO = 'audio/*';
const ACCEPT_VIDEO = 'video/*';
const ACCEPT_IMAGE = 'image/*';
public function __construct()
parent::__construct();
$this->attributes->setAttribute('type', 'file');
}
/**
* @param string|null $name
$name
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.
*
* @return static
*/
public function accept($type)
return $this->attribute('accept', $type);
public function acceptAudio()
return $this->attribute('accept', self::ACCEPT_AUDIO);
public function acceptVideo()
return $this->attribute('accept', self::ACCEPT_VIDEO);
public function acceptImage()
return $this->attribute('accept', self::ACCEPT_IMAGE);
public function multiple()
return $this->attribute('multiple');
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.