From a128c05a97b98e6a243060665a1e53fa7a4b79a4 Mon Sep 17 00:00:00 2001 From: Dag Date: Tue, 5 Aug 2025 21:06:40 +0200 Subject: [PATCH] docs: emphasize strict types (#4657) --- README.md | 12 +++- .../01_How_to_create_a_new_bridge.md | 55 ++++++++++--------- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 66d9b46e..7e155db7 100644 --- a/README.md +++ b/README.md @@ -321,13 +321,23 @@ The sqlite files (db, wal and shm) are not writeable. rm cache/* -### How to create a new bridge from scratch +### How to create a completely new bridge + +New code files MUST have `declare(strict_types=1);` at the top of file: + +```php +` is [omitted](http://php.net/basic-syntax.instruction-separation). - -**Example:** +New code files MUST have `declare(strict_types=1);` at the top of file: ```php find('.blog-posts li') as $li) { + $a = $li->find('a', 0); + $this->items[] = [ + 'title' => $a->plaintext, + 'uri' => 'https://herman.bearblog.dev' . $a->href, + ]; + } + } +} +``` + +Learn more in [bridge api](https://rss-bridge.github.io/rss-bridge/Bridge_API/index.html).