PHP Class GrumPHP\Linter\Yaml\YamlLinter

Inheritance: implements GrumPHP\Linter\LinterInterface
Show file Open project: phpro/grumphp Class Usage Examples

Public Methods

Method Description
__construct ( Filesystem $filesystem ) YamlLinter constructor.
isInstalled ( ) : boolean
lint ( SplFileInfo $file ) : LintErrorsCollection
setExceptionOnInvalidType ( boolean $exceptionOnInvalidType )
setObjectSupport ( boolean $objectSupport )
supportsFlags ( ) : boolean This method can be used to determine the Symfony Linter version.

Private Methods

Method Description
parseYaml ( string $content )

Method Details

__construct() public method

YamlLinter constructor.
public __construct ( Filesystem $filesystem )
$filesystem GrumPHP\Util\Filesystem

isInstalled() public method

public isInstalled ( ) : boolean
return boolean

lint() public method

public lint ( SplFileInfo $file ) : LintErrorsCollection
$file SplFileInfo
return GrumPHP\Collection\LintErrorsCollection

setExceptionOnInvalidType() public method

public setExceptionOnInvalidType ( boolean $exceptionOnInvalidType )
$exceptionOnInvalidType boolean

setObjectSupport() public method

public setObjectSupport ( boolean $objectSupport )
$objectSupport boolean

supportsFlags() public static method

If this method returns true, you are using Symfony YAML > 3.1.
public static supportsFlags ( ) : boolean
return boolean