@@ -114,13 +114,13 @@ |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // match a regex of an CIDR range: |
| 117 | - $ipcidr = '@' . RegexConstants::IPV4 . RegexConstants::IPV4_CIDR . '@'; |
|
| 117 | + $ipcidr = '@'.RegexConstants::IPV4.RegexConstants::IPV4_CIDR.'@'; |
|
| 118 | 118 | if (preg_match($ipcidr, $line) === 1) { |
| 119 | 119 | $iprange[] = $line; |
| 120 | 120 | continue; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - $ipnoncidr = '@' . RegexConstants::IPV4 . '@'; |
|
| 123 | + $ipnoncidr = '@'.RegexConstants::IPV4.'@'; |
|
| 124 | 124 | if (preg_match($ipnoncidr, $line) === 1) { |
| 125 | 125 | $ip[] = $line; |
| 126 | 126 | continue; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | $dataList = ''; |
| 24 | 24 | foreach ($generator() as $dataItem) { |
| 25 | - $dataList .= '"' . htmlentities($dataItem) . '", '; |
|
| 25 | + $dataList .= '"'.htmlentities($dataItem).'", '; |
|
| 26 | 26 | } |
| 27 | - $dataList = "[" . rtrim($dataList, ", ") . "]"; |
|
| 27 | + $dataList = "[".rtrim($dataList, ", ")."]"; |
|
| 28 | 28 | |
| 29 | 29 | $script = <<<JS |
| 30 | 30 | $('.{$class}').typeahead({ |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | foreach ($this->definedClasses as $class => $js) { |
| 49 | - $jsBlocks = $js . "\r\n\r\n"; |
|
| 49 | + $jsBlocks = $js."\r\n\r\n"; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $data = <<<HTML |
@@ -51,10 +51,10 @@ |
||
| 51 | 51 | $output .= "#{$count}: "; |
| 52 | 52 | |
| 53 | 53 | if (isset($line['type']) && $line['type'] != "") { |
| 54 | - $output .= $line['class'] . $line['type']; |
|
| 54 | + $output .= $line['class'].$line['type']; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $output .= $line['function'] . "(...)"; |
|
| 57 | + $output .= $line['function']."(...)"; |
|
| 58 | 58 | $output .= " [{$line['file']}#{$line['line']}\r\n"; |
| 59 | 59 | |
| 60 | 60 | $count++; |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $headerString = ''; |
| 25 | 25 | |
| 26 | 26 | foreach ($headers as $header => $headerValue) { |
| 27 | - $headerString .= $header . ': ' . $headerValue . "\r\n"; |
|
| 27 | + $headerString .= $header.': '.$headerValue."\r\n"; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | mail($to, $subject, $content, $headerString); |
@@ -404,11 +404,11 @@ |
||
| 404 | 404 | public function getRevealHash() |
| 405 | 405 | { |
| 406 | 406 | $data = $this->id // unique per request |
| 407 | - . '|' . $this->ip // } |
|
| 408 | - . '|' . $this->forwardedip // } private data not known to those without access |
|
| 409 | - . '|' . $this->useragent // } |
|
| 410 | - . '|' . $this->email // } |
|
| 411 | - . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
| 407 | + . '|'.$this->ip // } |
|
| 408 | + . '|'.$this->forwardedip // } private data not known to those without access |
|
| 409 | + . '|'.$this->useragent // } |
|
| 410 | + . '|'.$this->email // } |
|
| 411 | + . '|'.$this->status; // to rudimentarily invalidate the token on status change |
|
| 412 | 412 | |
| 413 | 413 | return hash('sha256', $data); |
| 414 | 414 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | final protected function setUpSmarty() |
| 55 | 55 | { |
| 56 | 56 | $this->smarty = new Smarty(); |
| 57 | - $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath() . '/smarty-plugins'); |
|
| 57 | + $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath().'/smarty-plugins'); |
|
| 58 | 58 | |
| 59 | 59 | $this->assign('currentUser', User::getCommunity()); |
| 60 | 60 | $this->assign('loggedIn', false); |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | |
| 97 | 97 | $statement = $this->getDatabase()->prepare($query); |
| 98 | 98 | $statement->bindValue(":username", $this->user->getUsername()); |
| 99 | - $statement->bindValue(":date", date('Y-m-d') . "%"); |
|
| 99 | + $statement->bindValue(":date", date('Y-m-d')."%"); |
|
| 100 | 100 | $statement->execute(); |
| 101 | 101 | $today = $statement->fetchColumn(); |
| 102 | 102 | $statement->closeCursor(); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $cacheResult->delete(); |
| 73 | 73 | |
| 74 | 74 | if (isset($result['error']['info'])) { |
| 75 | - throw new Exception("Unrecognised API response to query: " . $result['error']['info']); |
|
| 75 | + throw new Exception("Unrecognised API response to query: ".$result['error']['info']); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | throw new Exception("Unrecognised API response to query."); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | if ($result['antispoof']['result'] == "error") { |
| 92 | 92 | // we've got conflicts, let's do something with them. |
| 93 | - throw new Exception("Encountered error while getting result: " . $result['antispoof']['error']); |
|
| 93 | + throw new Exception("Encountered error while getting result: ".$result['antispoof']['error']); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | throw new Exception("Unrecognised API response to query."); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $statement = $database->prepare($query); |
| 63 | 63 | |
| 64 | 64 | foreach ($destinationIps as $ip) { |
| 65 | - echo 'Fetching data for ' . $ip . PHP_EOL; |
|
| 65 | + echo 'Fetching data for '.$ip.PHP_EOL; |
|
| 66 | 66 | |
| 67 | 67 | $statement->bindValue(':exitaddr', $ip); |
| 68 | 68 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | )); |
| 82 | 82 | |
| 83 | 83 | foreach (array(80 => $http, 443 => $https) as $port => $response) { |
| 84 | - echo ' Running for port ' . $ip . ':' . $port . PHP_EOL; |
|
| 84 | + echo ' Running for port '.$ip.':'.$port.PHP_EOL; |
|
| 85 | 85 | |
| 86 | 86 | $statement->bindValue(':exitport', $port); |
| 87 | 87 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - echo 'Done for ' . $ip . PHP_EOL; |
|
| 102 | + echo 'Done for '.$ip.PHP_EOL; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // kill old cached entries |