mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 13:50:23 +02: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:
@@ -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
|
||||
],
|
||||
|
||||
|
Reference in New Issue
Block a user