for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NoaaCapAlerts\XmlProvider;
class XmlProviderFactory
{
protected $localFilePath;
function __construct(string $localFilePath = null)
$this->localFilePath = $localFilePath;
}
public function getXmlProvider() : XmlProvider
if ($this->localFilePath != null) {
$this->localFilePath
null|string
null
!==
return new FileProvider($this->localFilePath);
return new DownloaderProvider();