mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-16 21:58:21 +01:00
Fix coding style missed by phpbcf (#2901)
$ composer require --dev friendsofphp/php-cs-fixer $ echo >.php-cs-fixer.dist.php "<?php $finder = PhpCsFixer\Finder::create() ->in(__DIR__); $rules = [ '@PSR12' => true, // '@PSR12:risky' => true, '@PHP74Migration' => true, // '@PHP74Migration:risky' => true, // buggy, duplicates existing comment sometimes 'no_break_comment' => false, 'array_syntax' => true, 'lowercase_static_reference' => true, 'visibility_required' => false, // Too much noise 'binary_operator_spaces' => false, 'heredoc_indentation' => false, 'trailing_comma_in_multiline' => false, ]; $config = new PhpCsFixer\Config(); return $config ->setRules($rules) // ->setRiskyAllowed(true) ->setFinder($finder); " $ vendor/bin/php-cs-fixer --version PHP CS Fixer 3.8.0 BerSzcz against war! by Fabien Potencier and Dariusz Ruminski. PHP runtime: 8.1.7 $ vendor/bin/php-cs-fixer fix $ rm .php-cs-fixer.cache $ vendor/bin/php-cs-fixer fix
This commit is contained in:
parent
dbf8c5b7ae
commit
951092eef3
@ -33,7 +33,7 @@ class CeskaTelevizeBridge extends BridgeAbstract
|
||||
returnServerError('Could not get date from Česká televize string');
|
||||
}
|
||||
|
||||
$date = sprintf('%04d-%02d-%02d', isset($match[3]) ? $match[3] : date('Y'), $match[2], $match[1]);
|
||||
$date = sprintf('%04d-%02d-%02d', $match[3] ?? date('Y'), $match[2], $match[1]);
|
||||
return strtotime($date);
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ class CeskaTelevizeBridge extends BridgeAbstract
|
||||
returnServerError('Invalid url');
|
||||
}
|
||||
|
||||
$category = isset($match[4]) ? $match[4] : 'nove';
|
||||
$category = $match[4] ?? 'nove';
|
||||
$fixedUrl = "{$match[1]}dily/{$category}/";
|
||||
|
||||
$html = getSimpleHTMLDOM($fixedUrl);
|
||||
@ -78,11 +78,11 @@ class CeskaTelevizeBridge extends BridgeAbstract
|
||||
|
||||
public function getURI()
|
||||
{
|
||||
return isset($this->feedUri) ? $this->feedUri : parent::getURI();
|
||||
return $this->feedUri ?? parent::getURI();
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->feedName) ? $this->feedName : parent::getName();
|
||||
return $this->feedName ?? parent::getName();
|
||||
}
|
||||
}
|
||||
|
@ -85,12 +85,14 @@ class FB2Bridge extends BridgeAbstract
|
||||
$pageInfo = $this->getPageInfos($page, $cookies);
|
||||
|
||||
if ($pageInfo['userId'] === null) {
|
||||
returnClientError(<<<EOD
|
||||
returnClientError(
|
||||
<<<EOD
|
||||
Unable to get the page id. You should consider getting the ID by hand, then importing it into FB2Bridge
|
||||
EOD
|
||||
);
|
||||
} elseif ($pageInfo['userId'] == -1) {
|
||||
returnClientError(<<<EOD
|
||||
returnClientError(
|
||||
<<<EOD
|
||||
This page is not accessible without being logged in.
|
||||
EOD
|
||||
);
|
||||
|
@ -67,7 +67,7 @@ class FacebookBridge extends BridgeAbstract
|
||||
switch ($this->queriedContext) {
|
||||
case 'User':
|
||||
if (!empty($this->authorName)) {
|
||||
return isset($this->extraInfos['name']) ? $this->extraInfos['name'] : $this->authorName;
|
||||
return $this->extraInfos['name'] ?? $this->authorName;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -51,7 +51,7 @@ TEXT;
|
||||
}
|
||||
|
||||
// Sort by timestamp descending
|
||||
usort($this->items, fn($a, $b) => $b['timestamp'] <=> $a['timestamp']);
|
||||
usort($this->items, fn ($a, $b) => $b['timestamp'] <=> $a['timestamp']);
|
||||
|
||||
// Remove duplicates
|
||||
$items = [];
|
||||
|
@ -274,18 +274,18 @@ class GithubIssueBridge extends BridgeAbstract
|
||||
|
||||
switch (count($path_segments)) {
|
||||
case 2: // Project issues
|
||||
list($user, $project) = $path_segments;
|
||||
[$user, $project] = $path_segments;
|
||||
$show_comments = 'off';
|
||||
break;
|
||||
case 3: // Project issues with issue comments
|
||||
if ($path_segments[2] !== static::URL_PATH) {
|
||||
return null;
|
||||
}
|
||||
list($user, $project) = $path_segments;
|
||||
[$user, $project] = $path_segments;
|
||||
$show_comments = 'on';
|
||||
break;
|
||||
case 4: // Issue comments
|
||||
list($user, $project, /* issues */, $issue) = $path_segments;
|
||||
[$user, $project, /* issues */, $issue] = $path_segments;
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
@ -294,8 +294,8 @@ class GithubIssueBridge extends BridgeAbstract
|
||||
return [
|
||||
'u' => $user,
|
||||
'p' => $project,
|
||||
'c' => isset($show_comments) ? $show_comments : null,
|
||||
'i' => isset($issue) ? $issue : null,
|
||||
'c' => $show_comments ?? null,
|
||||
'i' => $issue ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class GolemBridge extends FeedExpander
|
||||
protected function parseItem($item)
|
||||
{
|
||||
$item = parent::parseItem($item);
|
||||
$item['content'] = $item['content'] ?? '';
|
||||
$item['content'] ??= '';
|
||||
$uri = $item['uri'];
|
||||
|
||||
while ($uri) {
|
||||
|
@ -196,7 +196,7 @@ EOD;
|
||||
|
||||
$item['content'] = <<<EOD
|
||||
<p><strong>Subject: {$result->find('div.review-title', 0)->plaintext}</strong></p>
|
||||
<p>{$result->find('div.hidden-lists.review' , 0)->children(1)->plaintext}</p>
|
||||
<p>{$result->find('div.hidden-lists.review', 0)->children(1)->plaintext}</p>
|
||||
EOD;
|
||||
|
||||
$item['enclosures'][] = self::URI . $result->find('img.item-img', 0)->source;
|
||||
|
@ -120,7 +120,7 @@ class IvooxBridge extends BridgeAbstract
|
||||
|
||||
foreach ($originalLocales as $localeSetting) {
|
||||
if (strpos($localeSetting, '=') !== false) {
|
||||
list($category, $locale) = explode('=', $localeSetting);
|
||||
[$category, $locale] = explode('=', $localeSetting);
|
||||
} else {
|
||||
$category = LC_ALL;
|
||||
$locale = $localeSetting;
|
||||
|
@ -66,11 +66,11 @@ class MallTvBridge extends BridgeAbstract
|
||||
|
||||
public function getURI()
|
||||
{
|
||||
return isset($this->feedUri) ? $this->feedUri : parent::getURI();
|
||||
return $this->feedUri ?? parent::getURI();
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return isset($this->feedName) ? $this->feedName : parent::getName();
|
||||
return $this->feedName ?? parent::getName();
|
||||
}
|
||||
}
|
||||
|
@ -230,17 +230,17 @@ class NationalGeographicBridge extends BridgeAbstract
|
||||
if (isset($image['crdt'])) {
|
||||
$image_credit = $image['crdt'];
|
||||
}
|
||||
$caption = (isset($image_module['caption']) ? $image_module['caption'] : '');
|
||||
$caption = ($image_module['caption'] ?? '');
|
||||
break;
|
||||
case 'photogallery':
|
||||
$image_credit = (isset($image_module['caption']['credit']) ? $image_module['caption']['credit'] : '');
|
||||
$image_credit = ($image_module['caption']['credit'] ?? '');
|
||||
$caption = $image_module['caption']['text'];
|
||||
$image_src = $image_module['img']['src'];
|
||||
$image_alt = $image_module['img']['altText'];
|
||||
break;
|
||||
case 'video':
|
||||
$image_credit = (isset($image_module['credit']) ? $image_module['credit'] : '');
|
||||
$description = (isset($image_module['description']) ? $image_module['description'] : '');
|
||||
$image_credit = ($image_module['credit'] ?? '');
|
||||
$description = ($image_module['description'] ?? '');
|
||||
$caption = $description . ' Video can be watched on the article\'s page';
|
||||
$image = $image_module['image'];
|
||||
$image_alt = $image['altText'];
|
||||
@ -325,7 +325,7 @@ EOD;
|
||||
if (isset($module['image'])) {
|
||||
$content .= $this->handleImages($module['image'], $module['image']['cmsType']);
|
||||
}
|
||||
$content .= '<p>' . (isset($module['text']) ? $module['text'] : '') . '</p>';
|
||||
$content .= '<p>' . ($module['text'] ?? '') . '</p>';
|
||||
break;
|
||||
case 'photogallery':
|
||||
$gallery = $body['cntnt']['media'];
|
||||
@ -339,9 +339,9 @@ EOD;
|
||||
case 'pullquote':
|
||||
$quote = $module['quote'];
|
||||
$author_name = '';
|
||||
$authors = (isset($module['byLineProps']['authors']) ? $module['byLineProps']['authors'] : []);
|
||||
$authors = ($module['byLineProps']['authors'] ?? []);
|
||||
foreach ($authors as $author) {
|
||||
$author_desc = (isset($author['authorDesc']) ? $author['authorDesc'] : '');
|
||||
$author_desc = ($author['authorDesc'] ?? '');
|
||||
$author_name .= $author['displayName'] . ', ' . $author_desc;
|
||||
}
|
||||
$content .= <<<EOD
|
||||
|
@ -84,7 +84,7 @@ class NpciBridge extends BridgeAbstract
|
||||
$item = [
|
||||
'uri' => $uri,
|
||||
'title' => $title,
|
||||
'content' => $title ,
|
||||
'content' => $title,
|
||||
'uid' => sha1($pdfLink),
|
||||
'enclosures' => [
|
||||
$uri
|
||||
|
@ -76,7 +76,9 @@ class OneFortuneADayBridge extends BridgeAbstract
|
||||
|
||||
private function getQuote($seed)
|
||||
{
|
||||
$quotes = explode('//', <<<QUOTES
|
||||
$quotes = explode(
|
||||
'//',
|
||||
<<<QUOTES
|
||||
People are naturally attracted to you.
|
||||
//You learn from your mistakes... You will learn a lot today.
|
||||
//If you have something good in your life, don't let it go!
|
||||
|
@ -58,7 +58,7 @@ class ParuVenduImmoBridge extends BridgeAbstract
|
||||
$price = '';
|
||||
}
|
||||
|
||||
list($href) = explode('#', $element->href);
|
||||
[$href] = explode('#', $element->href);
|
||||
|
||||
$item = [];
|
||||
$item['uri'] = self::URI . $href;
|
||||
|
@ -214,7 +214,7 @@ EOD;
|
||||
*/
|
||||
$item['categories'] = $post['tags'];
|
||||
if ($embPost) {
|
||||
if ($this -> getInput('noretags') || ($post['tags'] == null )) {
|
||||
if ($this -> getInput('noretags') || ($post['tags'] == null)) {
|
||||
$item['categories'] = $post['original_post']['tag_list'];
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ class RedditBridge extends BridgeAbstract
|
||||
$this->encodePermalink($data->permalink),
|
||||
'<img src="' . $data->url . '" />'
|
||||
);
|
||||
} elseif (isset($data->is_gallery) ? $data->is_gallery : false) {
|
||||
} elseif ($data->is_gallery ?? false) {
|
||||
// Multiple images
|
||||
|
||||
$images = [];
|
||||
|
@ -30,9 +30,9 @@ class ScmbBridge extends BridgeAbstract
|
||||
|
||||
// get publication date
|
||||
$str_date = $article->find('time', 0)->datetime;
|
||||
list($date, $time) = explode(' ', $str_date);
|
||||
list($y, $m, $d) = explode('-', $date);
|
||||
list($h, $i) = explode(':', $time);
|
||||
[$date, $time] = explode(' ', $str_date);
|
||||
[$y, $m, $d] = explode('-', $date);
|
||||
[$h, $i] = explode(':', $time);
|
||||
$timestamp = mktime($h, $i, 0, $m, $d, $y);
|
||||
$item['timestamp'] = $timestamp;
|
||||
|
||||
|
@ -33,7 +33,7 @@ class ShanaprojectBridge extends BridgeAbstract
|
||||
|
||||
public function getURI()
|
||||
{
|
||||
return isset($this->uri) ? $this->uri : parent::getURI();
|
||||
return $this->uri ?? parent::getURI();
|
||||
}
|
||||
|
||||
public function collectData()
|
||||
@ -47,11 +47,11 @@ class ShanaprojectBridge extends BridgeAbstract
|
||||
$min_total_episodes = $this->getInput('min_total_episodes') ?: 0;
|
||||
|
||||
foreach ($animes as $anime) {
|
||||
list(
|
||||
[
|
||||
$episodes_released,
|
||||
/* of */,
|
||||
$episodes_total
|
||||
) = explode(' ', $this->extractAnimeEpisodeInformation($anime));
|
||||
] = explode(' ', $this->extractAnimeEpisodeInformation($anime));
|
||||
|
||||
// Skip if not enough episodes yet
|
||||
if ($episodes_released < $min_episodes) {
|
||||
|
@ -646,7 +646,7 @@ class SkimfeedBridge extends BridgeAbstract
|
||||
$query = parse_url($anchor->href, PHP_URL_QUERY);
|
||||
|
||||
foreach (explode('&', $query) as $parameter) {
|
||||
list($key, $value) = explode('=', $parameter);
|
||||
[$key, $value] = explode('=', $parameter);
|
||||
|
||||
if ($key !== 'u') {
|
||||
continue;
|
||||
|
@ -339,7 +339,7 @@ EOD
|
||||
$item['timestamp'] = $realtweet->created_at;
|
||||
$item['id'] = $realtweet->id_str;
|
||||
$item['uri'] = self::URI . $item['username'] . '/status/' . $item['id'];
|
||||
$item['author'] = (isset($tweet->retweeted_status) ? 'RT: ' : '' )
|
||||
$item['author'] = (isset($tweet->retweeted_status) ? 'RT: ' : '')
|
||||
. $item['fullname']
|
||||
. ' (@'
|
||||
. $item['username'] . ')';
|
||||
@ -430,7 +430,7 @@ EOD;
|
||||
$video = null;
|
||||
$maxBitrate = -1;
|
||||
foreach ($media->video_info->variants as $variant) {
|
||||
$bitRate = isset($variant->bitrate) ? $variant->bitrate : -100;
|
||||
$bitRate = $variant->bitrate ?? -100;
|
||||
if ($bitRate > $maxBitrate) {
|
||||
$maxBitrate = $bitRate;
|
||||
$video = $variant->url;
|
||||
@ -646,7 +646,8 @@ EOD;
|
||||
default:
|
||||
$code = $e->getCode();
|
||||
$data = $e->getMessage();
|
||||
returnServerError(<<<EOD
|
||||
returnServerError(
|
||||
<<<EOD
|
||||
Failed to make api call: $api
|
||||
HTTP Status: $code
|
||||
Errormessage: $data
|
||||
|
@ -193,7 +193,7 @@ EOD
|
||||
|
||||
// Set default params
|
||||
$params = [
|
||||
'max_results' => (empty($maxResults) ? '10' : $maxResults ),
|
||||
'max_results' => (empty($maxResults) ? '10' : $maxResults),
|
||||
'tweet.fields'
|
||||
=> 'created_at,referenced_tweets,entities,attachments',
|
||||
'user.fields' => 'pinned_tweet_id',
|
||||
@ -219,7 +219,7 @@ EOD
|
||||
case 'By keyword or hashtag':
|
||||
$params = [
|
||||
'query' => $this->getInput('query'),
|
||||
'max_results' => (empty($maxResults) ? '10' : $maxResults ),
|
||||
'max_results' => (empty($maxResults) ? '10' : $maxResults),
|
||||
'tweet.fields'
|
||||
=> 'created_at,referenced_tweets,entities,attachments',
|
||||
'expansions'
|
||||
@ -241,7 +241,7 @@ EOD
|
||||
case 'By list ID':
|
||||
// Set default params
|
||||
$params = [
|
||||
'max_results' => (empty($maxResults) ? '10' : $maxResults ),
|
||||
'max_results' => (empty($maxResults) ? '10' : $maxResults),
|
||||
'tweet.fields'
|
||||
=> 'created_at,referenced_tweets,entities,attachments',
|
||||
'expansions'
|
||||
@ -429,7 +429,7 @@ EOD
|
||||
$this->item['timestamp'] = $tweet->created_at;
|
||||
$this->item['uri']
|
||||
= self::URI . $this->item['username'] . '/status/' . $this->item['id'];
|
||||
$this->item['author'] = ($isRetweet ? 'RT: ' : '' )
|
||||
$this->item['author'] = ($isRetweet ? 'RT: ' : '')
|
||||
. $this->item['fullname']
|
||||
. ' (@'
|
||||
. $this->item['username'] . ')';
|
||||
|
@ -103,7 +103,7 @@ class WorldCosplayBridge extends BridgeAbstract
|
||||
$list = $json->list;
|
||||
|
||||
foreach ($list as $img) {
|
||||
$image = isset($img->photo) ? $img->photo : $img;
|
||||
$image = $img->photo ?? $img;
|
||||
$item = [
|
||||
'uri' => self::URI . substr($image->url, 1),
|
||||
'title' => $image->subject,
|
||||
|
@ -15,8 +15,7 @@ class XPathBridge extends XPathAbstract
|
||||
'title' => <<<"EOL"
|
||||
You can specify any website URL which serves data suited for display in RSS feeds
|
||||
(for example a news blog).
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => 'https://news.blizzard.com/en-en',
|
||||
'defaultValue' => 'https://news.blizzard.com/en-en',
|
||||
'required' => true
|
||||
@ -29,8 +28,7 @@ Enter an XPath expression matching a list of dom nodes, each node containing one
|
||||
feed article item in total (usually a surrounding <div> or <span> tag). This will
|
||||
be the context nodes for all of the following expressions. This expression usually
|
||||
starts with a single forward slash.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => '/html/body/div/div[4]/div[2]/div[2]/div/div/section/ol/li/article',
|
||||
'defaultValue' => '/html/body/div/div[4]/div[2]/div[2]/div/div/section/ol/li/article',
|
||||
'required' => true
|
||||
@ -42,8 +40,7 @@ EOL
|
||||
This expression should match a node contained within each article item node
|
||||
containing the article headline. It should start with a dot followed by two
|
||||
forward slashes, referring to any descendant nodes of the article item node.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => './/div/div[2]/h2',
|
||||
'defaultValue' => './/div/div[2]/h2',
|
||||
'required' => true
|
||||
@ -56,8 +53,7 @@ This expression should match a node contained within each article item node
|
||||
containing the article content or description. It should start with a dot
|
||||
followed by two forward slashes, referring to any descendant nodes of the
|
||||
article item node.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => './/div[@class="ArticleListItem-description"]/div[@class="h6"]',
|
||||
'defaultValue' => './/div[@class="ArticleListItem-description"]/div[@class="h6"]',
|
||||
'required' => false
|
||||
@ -71,8 +67,7 @@ This expression should match a node's attribute containing the article URL
|
||||
followed by two forward slashes, referring to any descendant nodes of
|
||||
the article item node. Attributes can be selected by prepending an @ char
|
||||
before the attributes name.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => './/a[@class="ArticleLink ArticleLink"]/@href',
|
||||
'defaultValue' => './/a[@class="ArticleLink ArticleLink"]/@href',
|
||||
'required' => false
|
||||
@ -85,8 +80,7 @@ This expression should match a node contained within each article item
|
||||
node containing the article author's name. It should start with a dot
|
||||
followed by two forward slashes, referring to any descendant nodes of
|
||||
the article item node.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'required' => false
|
||||
],
|
||||
|
||||
@ -98,8 +92,7 @@ article timestamp or date (parsable by PHP's strtotime function). It
|
||||
should start with a dot followed by two forward slashes, referring to
|
||||
any descendant nodes of the article item node. Attributes can be
|
||||
selected by prepending an @ char before the attributes name.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => './/time[@class="ArticleListItem-footerTimestamp"]/@timestamp',
|
||||
'defaultValue' => './/time[@class="ArticleListItem-footerTimestamp"]/@timestamp',
|
||||
'required' => false
|
||||
@ -113,8 +106,7 @@ image URL (usually the src attribute of an <img> tag or a style
|
||||
attribute). It should start with a dot followed by two forward slashes,
|
||||
referring to any descendant nodes of the article item node. Attributes
|
||||
can be selected by prepending an @ char before the attributes name.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => './/div[@class="ArticleListItem-image"]/@style',
|
||||
'defaultValue' => './/div[@class="ArticleListItem-image"]/@style',
|
||||
'required' => false
|
||||
@ -130,8 +122,7 @@ in a data attribute. It should start with a dot followed by two
|
||||
forward slashes, referring to any descendant nodes of the article
|
||||
item node. Attributes can be selected by prepending an @ char
|
||||
before the attributes name.
|
||||
EOL
|
||||
, 'type' => 'text',
|
||||
EOL, 'type' => 'text',
|
||||
'exampleValue' => './/div[@class="ArticleListItem-label"]',
|
||||
'defaultValue' => './/div[@class="ArticleListItem-label"]',
|
||||
'required' => false
|
||||
@ -144,8 +135,7 @@ Check this to fix feed encoding by invoking PHP's utf8_decode
|
||||
function on all extracted texts. Try this in case you see "broken" or
|
||||
"weird" characters in your feed where you'd normally expect umlauts
|
||||
or any other non-ascii characters.
|
||||
EOL
|
||||
, 'type' => 'checkbox',
|
||||
EOL, 'type' => 'checkbox',
|
||||
'required' => false
|
||||
],
|
||||
|
||||
|
@ -26,7 +26,7 @@ while ($next) { /* Collect all contributors */
|
||||
|
||||
// Check if there is a link with 'rel="next"'
|
||||
foreach ($links as $link) {
|
||||
list($url, $type) = explode(';', $link, 2);
|
||||
[$url, $type] = explode(';', $link, 2);
|
||||
|
||||
if (trim($type) === 'rel="next"') {
|
||||
$url = trim(preg_replace('/([<>])/', '', $url));
|
||||
|
@ -162,7 +162,7 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = isset($properties['type']) ? $properties['type'] : 'text';
|
||||
$type = $properties['type'] ?? 'text';
|
||||
|
||||
switch ($type) {
|
||||
case 'checkbox':
|
||||
|
@ -114,7 +114,7 @@ class Debug
|
||||
$calling = end($backtrace);
|
||||
$message = $calling['file'] . ':'
|
||||
. $calling['line'] . ' class '
|
||||
. (isset($calling['class']) ? $calling['class'] : '<no-class>') . '->'
|
||||
. ($calling['class'] ?? '<no-class>') . '->'
|
||||
. $calling['function'] . ' - '
|
||||
. $text;
|
||||
|
||||
|
@ -77,7 +77,7 @@ function buildBridgeException(\Throwable $e, BridgeInterface $bridge): string
|
||||
$body = 'Error message: `'
|
||||
. $e->getMessage()
|
||||
. "`\nQuery string: `"
|
||||
. (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '')
|
||||
. ($_SERVER['QUERY_STRING'] ?? '')
|
||||
. "`\nVersion: `"
|
||||
. Configuration::getVersion()
|
||||
. '`';
|
||||
@ -105,7 +105,7 @@ function buildTransformException(\Throwable $e, BridgeInterface $bridge): string
|
||||
$body = 'Error message: `'
|
||||
. $e->getMessage()
|
||||
. "`\nQuery string: `"
|
||||
. (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '')
|
||||
. ($_SERVER['QUERY_STRING'] ?? '')
|
||||
. '`';
|
||||
|
||||
$link = buildGitHubIssueQuery($title, $body, 'Bridge-Broken', $bridge->getMaintainer());
|
||||
|
@ -405,7 +405,8 @@ abstract class FeedExpander extends BridgeAbstract
|
||||
foreach ($feedItem->guid->attributes() as $attribute => $value) {
|
||||
if (
|
||||
$attribute === 'isPermaLink'
|
||||
&& ($value === 'true' || (
|
||||
&& (
|
||||
$value === 'true' || (
|
||||
filter_var($feedItem->guid, FILTER_VALIDATE_URL)
|
||||
&& (empty($item['uri']) || !filter_var($item['uri'], FILTER_VALIDATE_URL))
|
||||
)
|
||||
|
@ -140,7 +140,8 @@ function extractFromDelimiters($string, $start, $end)
|
||||
$section_retrieved = substr($string, strpos($string, $start) + strlen($start));
|
||||
$section_retrieved = substr($section_retrieved, 0, strpos($section_retrieved, $end));
|
||||
return $section_retrieved;
|
||||
} return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user