Add PHPStan and other quality checks

Similar to FreshRSS core
Contributes to https://github.com/FreshRSS/Extensions/issues/184
This commit is contained in:
Alexandre Alapetite 2023-11-23 22:41:09 +01:00
parent a86467db48
commit b49596818c
No known key found for this signature in database
GPG key ID: A24378C38E812B23
59 changed files with 1173 additions and 404 deletions

View file

@ -6,6 +6,6 @@ Note the API is NOT FULLY SUPPORTED YET!
Please be sure to enable API in the configuration and set an API password on your profile.
URL to use is something like http://rss.example.com/api/ttrss.php or http://example.com/freshrss/p/api/ttrss.php.
URL to use is something like <http://rss.example.com/api/ttrss.php> or <http://example.com/freshrss/p/api/ttrss.php>.
To use it, upload this directory in your `./extensions` directory and enable it on the extension panel in FreshRSS.

View file

@ -1,11 +1,12 @@
<?php
declare(strict_types=1);
class TTRSS_APIExtension extends Minz_Extension {
public function init() {
$this->registerHook('post_update',
array($this, 'postUpdateHook'));
$this->registerHook(
'post_update',
array($this, 'postUpdateHook')
);
}
public function install() {

View file

@ -339,7 +339,7 @@ class FreshAPI_TTRSS {
if ($show_excerpt) {
// @todo add a facultative max char in content method to get
// an exerpt.
// an excerpt.
$line['excerpt'] = $item->content();
}