private function prefixWithDateIfFound(AbstractFile $file, string $outputPath): string
    {
        if ($file->getDate() === null) {
            return $outputPath;
        }

        return str_replace(
            [':year', ':month', ':day'],
            [$file->getDateInFormat('Y'), $file->getDateInFormat('m'), $file->getDateInFormat('d')],
            $outputPath
        );
    }
private function prefixWithDateIfFound(AbstractFile $file, string $outputPath): string
    {
        if ($file->getDate() === null) {
            return $outputPath;
        }

        return str_replace(
            [':year', ':month', ':day'],
            [$file->getDateInFormat('Y'), $file->getDateInFormat('m'), $file->getDateInFormat('d')],
            $outputPath
        );
    }
private function prefixWithDateIfFound ( AbstractFile $ file , string $ outputPath ) : string { if ( $ file -> getDate ( ) === null ) { return $ outputPath ; } return str_replace ( [ ':year' , ':month' , ':day' ] , [ $ file -> getDateInFormat ( 'Y' ) , $ file -> getDateInFormat ( 'm' ) , $ file -> getDateInFormat ( 'd' ) ] , $ outputPath ) ; }
Only if the date is part of file name
Only if the date is part of file name