@@ -39,8 +39,9 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | parent::errorCheck($this); |
| 41 | 41 | |
| 42 | - if (!$this->_error) |
|
| 43 | - self::setBiodata(); |
|
| 42 | + if (!$this->_error) { |
|
| 43 | + self::setBiodata(); |
|
| 44 | + } |
|
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | /** |
@@ -53,8 +54,9 @@ discard block |
||
| 53 | 54 | */ |
| 54 | 55 | public function __call($method, $arguments) |
| 55 | 56 | { |
| 56 | - if ($this->_error) |
|
| 57 | - return $this->_error; |
|
| 57 | + if ($this->_error) { |
|
| 58 | + return $this->_error; |
|
| 59 | + } |
|
| 58 | 60 | return call_user_func_array([$this, $method], $arguments); |
| 59 | 61 | } |
| 60 | 62 | |
@@ -147,19 +149,23 @@ discard block |
||
| 147 | 149 | $biodata = trim($biodata[1]); |
| 148 | 150 | } |
| 149 | 151 | |
| 150 | - if ($type == 'given_name' || $type == 'family_name' || $type == 'birthday') |
|
| 151 | - return $biodata; |
|
| 152 | + if ($type == 'given_name' || $type == 'family_name' || $type == 'birthday') { |
|
| 153 | + return $biodata; |
|
| 154 | + } |
|
| 152 | 155 | |
| 153 | - if ($type == 'alternative_name') |
|
| 154 | - return explode(', ', $biodata); |
|
| 156 | + if ($type == 'alternative_name') { |
|
| 157 | + return explode(', ', $biodata); |
|
| 158 | + } |
|
| 155 | 159 | |
| 156 | - if ($type == 'favorite') |
|
| 157 | - return str_replace(',', '', $biodata); |
|
| 160 | + if ($type == 'favorite') { |
|
| 161 | + return str_replace(',', '', $biodata); |
|
| 162 | + } |
|
| 158 | 163 | |
| 159 | 164 | if ($type == 'website') { |
| 160 | 165 | preg_match('/".+"/', $biodata[0], $biodata); |
| 161 | - if ($biodata[0] != '"http://"') |
|
| 162 | - return str_replace('"', '', $biodata[0]); |
|
| 166 | + if ($biodata[0] != '"http://"') { |
|
| 167 | + return str_replace('"', '', $biodata[0]); |
|
| 168 | + } |
|
| 163 | 169 | } |
| 164 | 170 | } |
| 165 | 171 | return null; |
@@ -43,8 +43,9 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function __call($method, $arguments) |
| 45 | 45 | { |
| 46 | - if ($this->_error) |
|
| 47 | - return $this->_error; |
|
| 46 | + if ($this->_error) { |
|
| 47 | + return $this->_error; |
|
| 48 | + } |
|
| 48 | 49 | return call_user_func_array([$this, $method], $arguments); |
| 49 | 50 | } |
| 50 | 51 | |
@@ -80,8 +81,9 @@ discard block |
||
| 80 | 81 | $nickname = $this->_parser->find('h1', 0)->plaintext; |
| 81 | 82 | $nickname = trim(preg_replace('/\s+/', ' ', $nickname)); |
| 82 | 83 | preg_match('/\"([^"])*/', $nickname, $nickname); |
| 83 | - if ($nickname) |
|
| 84 | - return substr($nickname[0], 1, strlen($nickname[0]) - 2); |
|
| 84 | + if ($nickname) { |
|
| 85 | + return substr($nickname[0], 1, strlen($nickname[0]) - 2); |
|
| 86 | + } |
|
| 85 | 87 | return null; |
| 86 | 88 | } |
| 87 | 89 | |
@@ -100,8 +102,9 @@ discard block |
||
| 100 | 102 | $name_kanji = $html->find('small', 0); |
| 101 | 103 | $name_kanji = $name_kanji ? $name_kanji->plaintext : ''; |
| 102 | 104 | |
| 103 | - if ($isKanji) |
|
| 104 | - return preg_replace('/(\(|\))/', '', $name_kanji); |
|
| 105 | + if ($isKanji) { |
|
| 106 | + return preg_replace('/(\(|\))/', '', $name_kanji); |
|
| 107 | + } |
|
| 105 | 108 | return trim(str_replace($name_kanji, '', $html->plaintext)); |
| 106 | 109 | } |
| 107 | 110 | |