mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 22:00:23 +02:00
[phpcs] Add missing rules
- Do not add spaces after opening or before closing parenthesis // Wrong if( !is_null($var) ) { ... } // Right if(!is_null($var)) { ... } - Add space after closing parenthesis // Wrong if(true){ ... } // Right if(true) { ... } - Add body into new line - Close body in new line // Wrong if(true) { ... } // Right if(true) { ... } Notice: Spaces after keywords are not detected: // Wrong (not detected) // -> space after 'if' and missing space after 'else' if (true) { ... } else{ ... } // Right if(true) { ... } else { ... }
This commit is contained in:
@@ -20,7 +20,7 @@ class AtomFormat extends FormatAbstract{
|
||||
$uri = $this->xml_encode($uri);
|
||||
|
||||
$entries = '';
|
||||
foreach($this->getItems() as $item){
|
||||
foreach($this->getItems() as $item) {
|
||||
$entryAuthor = isset($item['author']) ? $this->xml_encode($item['author']) : '';
|
||||
$entryTitle = isset($item['title']) ? $this->xml_encode($item['title']) : '';
|
||||
$entryUri = isset($item['uri']) ? $this->xml_encode($item['uri']) : '';
|
||||
@@ -28,8 +28,8 @@ class AtomFormat extends FormatAbstract{
|
||||
$entryContent = isset($item['content']) ? $this->xml_encode($this->sanitizeHtml($item['content'])) : '';
|
||||
|
||||
$entryEnclosures = '';
|
||||
if(isset($item['enclosures'])){
|
||||
foreach($item['enclosures'] as $enclosure){
|
||||
if(isset($item['enclosures'])) {
|
||||
foreach($item['enclosures'] as $enclosure) {
|
||||
$entryEnclosures .= '<link rel="enclosure" href="'
|
||||
. $this->xml_encode($enclosure)
|
||||
. '"/>'
|
||||
|
Reference in New Issue
Block a user