mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-27 01:54:40 +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:
@@ -38,7 +38,7 @@ class JapanExpoBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
$convert_article_images = function($matches){
|
||||
if(is_array($matches) && count($matches) > 1){
|
||||
if(is_array($matches) && count($matches) > 1) {
|
||||
return '<img src="' . $matches[1] . '" />';
|
||||
}
|
||||
};
|
||||
@@ -48,7 +48,7 @@ class JapanExpoBridge extends BridgeAbstract {
|
||||
$fullcontent = $this->getInput('mode');
|
||||
$count = 0;
|
||||
|
||||
foreach($html->find('a._tile2') as $element){
|
||||
foreach($html->find('a._tile2') as $element) {
|
||||
|
||||
$url = $element->href;
|
||||
$thumbnail = 'http://s.japan-expo.com/katana/images/JES049/paris.png';
|
||||
@@ -57,8 +57,8 @@ class JapanExpoBridge extends BridgeAbstract {
|
||||
if(count($img_search_result) >= 2)
|
||||
$thumbnail = trim($img_search_result[1], "'");
|
||||
|
||||
if($fullcontent){
|
||||
if($count >= 5){
|
||||
if($fullcontent) {
|
||||
if($count >= 5) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user