Skip to content

Commit

Permalink
chore: increase linter speed (#4211)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan authored Aug 11, 2024
1 parent 133dbf8 commit 4424ea5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"scripts": {
"test": "./vendor/bin/phpunit",
"lint": "./vendor/bin/phpcs --standard=phpcs.xml --warning-severity=0 --extensions=php -p ./",
"lint": "./vendor/bin/phpcs --parallel=2 --standard=phpcs.xml --warning-severity=0 --extensions=php -p ./",
"compat": "./vendor/bin/phpcs --standard=phpcompatibility.xml --warning-severity=0 --extensions=php -p ./"
}
}
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@

$cacheFactory = new CacheFactory($logger);

// Uncomment this for debug logging
// $logger->addHandler(new StreamHandler('/tmp/rss-bridge.txt', Logger::DEBUG));

if (Debug::isEnabled()) {
$logger->addHandler(new ErrorLogHandler(Logger::DEBUG));
$cache = $cacheFactory->create('array');
Expand Down
6 changes: 3 additions & 3 deletions lib/BridgeAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

abstract class BridgeAbstract
{
const NAME = 'Unnamed bridge';
const URI = '';
const NAME = null;
const URI = null;
const DONATION_URI = '';
const DESCRIPTION = 'No description provided';

Expand Down Expand Up @@ -61,7 +61,7 @@ public function getFeed(): array

public function getName()
{
return static::NAME;
return static::NAME ?? $this->getShortName();
}

public function getURI()
Expand Down

0 comments on commit 4424ea5

Please sign in to comment.