classes/phing/tasks/ext/XmlLintTask.php
public function main()
    {
        if (isset($this->schema) && !file_exists($this->schema->getPath())) {
            throw new BuildException("Schema file not found: " . $this->schema->getPath());
        }
        if (!isset($this->file) and count($this->filesets) == 0) {
            throw new BuildException("Missing either a nested fileset or attribute 'file' set");
        }

        set_error_handler([$this, 'errorHandler']);
        if ($this->file instanceof PhingFile) {
            $this->lint($this->file->getPath());
        } else { // process filesets
            $project = $this->getProject();
            foreach ($this->filesets as $fs) {
                $ds = $fs->getDirectoryScanner($project);
                $files = $ds->getIncludedFiles();
                $dir = $fs->getDir($this->project)->getPath();
                foreach ($files as $file) {
                    $this->lint($dir . DIRECTORY_SEPARATOR . $file);
                }
            }
        }
        restore_error_handler();
    }
public function main()
    {
        if (isset($this->schema) && !file_exists($this->schema->getPath())) {
            throw new BuildException("Schema file not found: " . $this->schema->getPath());
        }
        if (!isset($this->file) and count($this->filesets) == 0) {
            throw new BuildException("Missing either a nested fileset or attribute 'file' set");
        }

        set_error_handler([$this, 'errorHandler']);
        if ($this->file instanceof PhingFile) {
            $this->lint($this->file->getPath());
        } else { // process filesets
            $project = $this->getProject();
            foreach ($this->filesets as $fs) {
                $ds = $fs->getDirectoryScanner($project);
                $files = $ds->getIncludedFiles();
                $dir = $fs->getDir($this->project)->getPath();
                foreach ($files as $file) {
                    $this->lint($dir . DIRECTORY_SEPARATOR . $file);
                }
            }
        }
        restore_error_handler();
    }
public function main ( ) { if ( isset ( $ this -> schema ) && ! file_exists ( $ this -> schema -> getPath ( ) ) ) { throw new BuildException ( "Schema file not found: " . $ this -> schema -> getPath ( ) ) ; } if ( ! isset ( $ this -> file ) and count ( $ this -> filesets ) == 0 ) { throw new BuildException ( "Missing either a nested fileset or attribute 'file' set" ) ; } set_error_handler ( [ $ this , 'errorHandler' ] ) ; if ( $ this -> file instanceof PhingFile ) { $ this -> lint ( $ this -> file -> getPath ( ) ) ; } else { // process filesets $ project = $ this -> getProject ( ) ; foreach ( $ this -> filesets as $ fs ) { $ ds = $ fs -> getDirectoryScanner ( $ project ) ; $ files = $ ds -> getIncludedFiles ( ) ; $ dir = $ fs -> getDir ( $ this -> project ) -> getPath ( ) ; foreach ( $ files as $ file ) { $ this -> lint ( $ dir . DIRECTORY_SEPARATOR . $ file ) ; } } } restore_error_handler ( ) ; }
Execute lint check against PhingFile or a FileSet.

{@inheritdoc}

@throws BuildException

@return void
Execute lint check against PhingFile or a FileSet .