mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-16 00:44:44 +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:
parent
95071d0134
commit
fbaf26e8bf
11 changed files with 14 additions and 31 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue