New developer command to test all third-party extensions
* `composer run-script phpstan-third-party` * Rename the directory for generate.php to `third-party` instead of `tmp` * Take advantage of PHPStan checkMissingOverrideMethodAttribute https://phpstan.org/config-reference#checkmissingoverridemethodattribute * Detected and fixed bug in URL of https://github.com/tunbridgep/freshrss-invidious
This commit is contained in:
parent
9f21984b8c
commit
cc6bf0d1e6
45 changed files with 192 additions and 100 deletions
|
|
@ -1,14 +1,17 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
class TTRSS_APIExtension extends Minz_Extension {
|
||||
public function init() {
|
||||
final class TTRSS_APIExtension extends Minz_Extension {
|
||||
|
||||
#[Override]
|
||||
public function init(): void {
|
||||
$this->registerHook(
|
||||
'post_update',
|
||||
array($this, 'postUpdateHook')
|
||||
);
|
||||
}
|
||||
|
||||
#[Override]
|
||||
public function install() {
|
||||
$filename = 'ttrss.php';
|
||||
$file_source = join_path($this->getPath(), $filename);
|
||||
|
|
@ -36,6 +39,7 @@ class TTRSS_APIExtension extends Minz_Extension {
|
|||
return true;
|
||||
}
|
||||
|
||||
#[Override]
|
||||
public function uninstall() {
|
||||
$filename = 'ttrss.php';
|
||||
$file_destination = join_path(PUBLIC_PATH, 'api', $filename);
|
||||
|
|
@ -47,7 +51,7 @@ class TTRSS_APIExtension extends Minz_Extension {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function postUpdateHook() {
|
||||
public function postUpdateHook(): void {
|
||||
$res = $this->install();
|
||||
|
||||
if ($res !== true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue