//I tried to be clever and call pack() multiple times thinking I was getting the same\r
//object. Should I cache it in zipparser?\r
$pack = $zipParser->pack();\r
- $this->_fileRepository->save($pack->getBanner());\r
+ $packBanner = $pack->getBanner() ? $this->_fileRepository->save($pack->getBanner()) : null;\r
$this->_packRepository->save($pack);\r
}\r
\r
public function With_Title($title);
public function With_Uploader(IUser $uploader);
public function With_Simfiles(array $simfiles);
- public function With_Banner(IFile $banner);
+ public function With_Banner(IFile $banner = null);
public function With_File(IFile $file);
public function build();
}
\ No newline at end of file
return $this;
}
- public function With_Banner(IFile $banner)
+ public function With_Banner(IFile $banner = null)
{
$this->_banner = $banner;
}
interface IPackStepByStepBuilder_With_Simfiles
{
- public function With_Banner(IFile $banner);
+ public function With_Banner(IFile $banner = null);
public function With_File(IFile $file);
public function build();
}
class PackStepByStepBuilder_With_Simfiles extends AbstractPackStepByStepBuilder implements IPackStepByStepBuilder_With_Simfiles
{
- public function With_Banner(IFile $banner)
+ public function With_Banner(IFile $banner = null)
{
$this->_packBuilder->With_Banner($banner);
return $this;
if($displayBpm)
{
$bpmRange = explode(":",$displayBpm);
+ $bpmRange[1] = @$bpmRange[1] ?: $bpmRange[0];
} else {
$bpms = $this->extractKey('BPMS');
$bpmRange = $this->parseBpms($bpms);