PhpCsFixer\DocBlock\Tag::valid PHP Method

valid() public method

This is defined by if it exists in the proposed PSR PHPDoc standard.
public valid ( ) : boolean
return boolean
    public function valid()
    {
        return in_array($this->getName(), self::$tags, true);
    }

Usage Example

Beispiel #1
0
 /**
  * @dataProvider provideValidCases
  */
 public function testValid($expected, $input)
 {
     $tag = new Tag(new Line($input));
     $this->assertSame($expected, $tag->valid());
 }