1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-01 06:10:22 +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:
logmanoriginal
2017-07-29 19:28:00 +02:00
parent 38b56bf23a
commit a4b9611e66
128 changed files with 692 additions and 694 deletions

View File

@@ -32,9 +32,9 @@ class PinterestBridge extends FeedExpander {
);
public function collectData(){
switch($this->queriedContext){
switch($this->queriedContext) {
case 'By username and board':
if($this->getInput('r')){
if($this->getInput('r')) {
$html = getSimpleHTMLDOMCached($this->getURI());
$this->getUserResults($html);
} else {
@@ -55,7 +55,7 @@ class PinterestBridge extends FeedExpander {
$fullname = $json['resourceDataCache'][0]['data']['owner']['full_name'];
$avatar = $json['resourceDataCache'][0]['data']['owner']['image_small_url'];
foreach($results as $result){
foreach($results as $result) {
$item = array();
$item['uri'] = $result['link'];
@@ -97,7 +97,7 @@ class PinterestBridge extends FeedExpander {
$json = json_decode($html->find('#jsInit1', 0)->innertext, true);
$results = $json['resourceDataCache'][0]['data']['results'];
foreach($results as $result){
foreach($results as $result) {
$item = array();
$item['uri'] = self::URI . $result['board']['url'];
@@ -136,7 +136,7 @@ class PinterestBridge extends FeedExpander {
}
public function getURI(){
switch($this->queriedContext){
switch($this->queriedContext) {
case 'By username and board':
$uri = self::URI . '/' . urlencode($this->getInput('u')) . '/' . urlencode($this->getInput('b'));// . '.rss';
break;
@@ -149,7 +149,7 @@ class PinterestBridge extends FeedExpander {
}
public function getName(){
switch($this->queriedContext){
switch($this->queriedContext) {
case 'By username and board':
$specific = $this->getInput('u') . ' - ' . $this->getInput('b');
break;