1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-05 01:02:40 +02:00

fix(html_format): add spacing below date if author is missing (#3425)

* small ui tweak

* remove unused <div>

* refactor: rename method

* refactor: inline const

* refactor
This commit is contained in:
Dag
2023-06-08 23:04:16 +02:00
committed by GitHub
parent 95071d0134
commit fbaf26e8bf
11 changed files with 14 additions and 31 deletions

View File

@ -2,18 +2,16 @@
final class BridgeFactory
{
private $folder;
/** @var array<class-string<BridgeInterface>> */
private $bridgeClassNames = [];
/** @var array<class-string<BridgeInterface>> */
private $whitelist = [];
public function __construct(string $folder = PATH_LIB_BRIDGES)
public function __construct()
{
$this->folder = $folder;
// create names
foreach (scandir($this->folder) as $file) {
foreach (scandir(__DIR__ . '/../bridges/') as $file) {
if (preg_match('/^([^.]+Bridge)\.php$/U', $file, $m)) {
$this->bridgeClassNames[] = $m[1];
}
@ -27,6 +25,7 @@ final class BridgeFactory
} else {
$contents = '';
}
if ($contents === '*') {
// Whitelist all bridges
$this->whitelist = $this->getBridgeClassNames();