@@ -234,7 +234,7 @@ |
||
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | /** |
| 237 | - * @param array $list |
|
| 237 | + * @param string[] $list |
|
| 238 | 238 | * |
| 239 | 239 | * @return bool |
| 240 | 240 | */ |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | { |
| 84 | 84 | $url = parse_url($link); |
| 85 | 85 | if ($url === false) { |
| 86 | - throw new \Exception("Cannot parse link : " . $link); |
|
| 86 | + throw new \Exception("Cannot parse link : ".$link); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $this->client = $client; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | { |
| 243 | 243 | $result = true; |
| 244 | 244 | foreach ($list as $element) { |
| 245 | - $element = "check" . trim(strtolower($element)); |
|
| 245 | + $element = "check".trim(strtolower($element)); |
|
| 246 | 246 | $result &= $this->$element(); |
| 247 | 247 | } |
| 248 | 248 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public static function toTmpTxt($name, $result) |
| 36 | 36 | { |
| 37 | - $resultfile = sys_get_temp_dir() . "/" . uniqid($name) . ".txt"; |
|
| 37 | + $resultfile = sys_get_temp_dir()."/".uniqid($name).".txt"; |
|
| 38 | 38 | $resultoutput = new StreamOutput(fopen($resultfile, 'a', false)); |
| 39 | 39 | $resultoutput->write("\xEF\xBB\xBF"); //add ut8 bom to txt file |
| 40 | 40 | $resultoutput->write(print_r($result, true)); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public static function toTmpHtml($name, $result) |
| 54 | 54 | { |
| 55 | - $resultfile = sys_get_temp_dir() . "/" . uniqid($name) . ".html"; |
|
| 55 | + $resultfile = sys_get_temp_dir()."/".uniqid($name).".html"; |
|
| 56 | 56 | $html = self::toHtml($name, $result); |
| 57 | 57 | file_put_contents($resultfile, $html); |
| 58 | 58 | |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @return string |
| 69 | 69 | */ |
| 70 | - private static function toHtml($title,array $links) |
|
| 70 | + private static function toHtml($title, array $links) |
|
| 71 | 71 | { |
| 72 | 72 | $html = '<!DOCTYPE HTML>'; |
| 73 | 73 | $html .= '<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; |
| 74 | - $html .= '<title>' . $title . '</title>'; |
|
| 74 | + $html .= '<title>'.$title.'</title>'; |
|
| 75 | 75 | $html .= '<style>'; |
| 76 | 76 | $html .= '.error { color: red }'; |
| 77 | 77 | |
@@ -107,18 +107,18 @@ discard block |
||
| 107 | 107 | foreach ($links as $link) { |
| 108 | 108 | $html .= '<div class="link">'; |
| 109 | 109 | $url = $link->getLink(); |
| 110 | - $files = " -> " . implode(" ", $link->getFiles()); |
|
| 110 | + $files = " -> ".implode(" ", $link->getFiles()); |
|
| 111 | 111 | $errors = $link->getErrorMessages(); |
| 112 | 112 | |
| 113 | 113 | if (count($errors) <= 0) { |
| 114 | - $html .= '<a href="' . $url . '">' . $url . '</a>' . $files; |
|
| 114 | + $html .= '<a href="'.$url.'">'.$url.'</a>'.$files; |
|
| 115 | 115 | $html .= '</div>'; |
| 116 | 116 | continue; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $tooltip = implode(' ', $errors); |
| 120 | - $html .= '<a href="' . $url . '" class="error tooltip" data-tooltip="' . $tooltip . '">' . $url . '</a>' . $link->getStatusCode( |
|
| 121 | - ) . $files; |
|
| 120 | + $html .= '<a href="'.$url.'" class="error tooltip" data-tooltip="'.$tooltip.'">'.$url.'</a>'.$link->getStatusCode( |
|
| 121 | + ).$files; |
|
| 122 | 122 | $html .= '</div>'; |
| 123 | 123 | } |
| 124 | 124 | $html .= '<br><br><br></body></html>'; |
@@ -154,8 +154,8 @@ discard block |
||
| 154 | 154 | { |
| 155 | 155 | $result = []; |
| 156 | 156 | |
| 157 | - $this->checkStatus($result,$urlerrors,404); |
|
| 158 | - $this->checkStatus($result,$urlforbiddens, 403); |
|
| 157 | + $this->checkStatus($result, $urlerrors, 404); |
|
| 158 | + $this->checkStatus($result, $urlforbiddens, 403); |
|
| 159 | 159 | |
| 160 | 160 | return $result; |
| 161 | 161 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | if ($file->getExtension() == 'json') { |
| 230 | 230 | $linksByFile[$keyname] = $this->getJsonLinks($inner); |
| 231 | 231 | } else { |
| 232 | - throw new \Exception("Extension unknown : " . $keyname); |
|
| 232 | + throw new \Exception("Extension unknown : ".$keyname); |
|
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | } |