src/DotsUnited/BundleFu/FileList.php
public function addFile($file, $fileInfo)
    {
        if (!($fileInfo instanceof \SplFileInfo)) {
            $fileInfo = new \SplFileInfo($fileInfo);
        }

        $this->files[$file] = $fileInfo;

        try {
            $mTime = $fileInfo->getMTime();
        } catch (\Exception $e) {
            $mTime = 0;
        }

        if ($mTime > $this->maxMTime) {
            $this->maxMTime = $mTime;
        }

        return $this;
    }
public function addFile($file, $fileInfo)
    {
        if (!($fileInfo instanceof \SplFileInfo)) {
            $fileInfo = new \SplFileInfo($fileInfo);
        }

        $this->files[$file] = $fileInfo;

        try {
            $mTime = $fileInfo->getMTime();
        } catch (\Exception $e) {
            $mTime = 0;
        }

        if ($mTime > $this->maxMTime) {
            $this->maxMTime = $mTime;
        }

        return $this;
    }
public function addFile ( $ file , $ fileInfo ) { if ( ! ( $ fileInfo instanceof \ SplFileInfo ) ) { $ fileInfo = new \ SplFileInfo ( $ fileInfo ) ; } $ this -> files [ $ file ] = $ fileInfo ; try { $ mTime = $ fileInfo -> getMTime ( ) ; } catch ( \ Exception $ e ) { $ mTime = 0 ; } if ( $ mTime > $ this -> maxMTime ) { $ this -> maxMTime = $ mTime ; } return $ this ; }
Add a file to the list.

@param  string       $file     The file
@param  \SplFileInfo $fileInfo
@return FileList
Add a file to the list .