for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare( strict_types = 1 );
namespace WMDE\BannerServer\UseCase\BannerSelection;
use FileFetcher\FileFetcher;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Yaml\Yaml;
/**
* @license GNU GPL v2+
*/
class CampaignConfigurationLoader {
private const SEASONAL_IMPRESSION_LIMIT = 10;
private $fileSystem;
private $fileFetcher;
public function __construct( Filesystem $fileSystem, FileFetcher $fileFetcher ) {
$this->fileSystem = $fileSystem;
$this->fileFetcher = $fileFetcher;
}
private function loadFiles( string ...$configFiles ): array {
loadFiles()
This check looks for private methods that have been defined, but are not used inside the class.
$configs = [];
foreach ( $configFiles as $file ) {
if ( $this->fileSystem->exists( $file ) ) {
$configs[] = Yaml::parse( $this->fileFetcher->fetchFile( $file ) );
return $configs;
This check looks for private methods that have been defined, but are not used inside the class.