for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MagentoHackathon\Model;
use Symfony\Component\Finder\SplFileInfo;
/**
* Model for different file type list.
*/
class FileList
{
* @var array
private $templates = [];
private $phpFileList = [];
private $xmlFileList = [];
* @var string
private $composerFile = '';
* @param SplFileInfo $file
public function addEntry(SplFileInfo $file)
switch ($file->getExtension()) {
case 'php':
$this->phpFileList[] = $file;
break;
case 'json':
$this->composerFile = $file;
case 'xml':
$this->xmlFileList[] = $file;
default:
$this->templates[] = $file;
}
* @return SplFileInfo[] | array
public function getPhpFileList(): array
return $this->phpFileList;
* @return string
public function getComposerFile(): string
return $this->composerFile;
public function getTemplates(): array
return $this->templates;
public function getXmlFileList(): array
return $this->xmlFileList;