@@ -225,6 +225,7 @@ discard block |
||
| 225 | 225 | * Find element in HTML Dom |
| 226 | 226 | * |
| 227 | 227 | * @param string $content - content to be searched through |
| 228 | + * @param integer $nth |
|
| 228 | 229 | * @return object |
| 229 | 230 | */ |
| 230 | 231 | private function find($content, $selector, $nth = null) |
@@ -350,6 +351,8 @@ discard block |
||
| 350 | 351 | * Check whether errors have been returned |
| 351 | 352 | * |
| 352 | 353 | * @param string $content - response body of a request |
| 354 | + * @param string $selector |
|
| 355 | + * @param string $function |
|
| 353 | 356 | * @return boolean - false if no element described by the selector exists |
| 354 | 357 | */ |
| 355 | 358 | private function checkErrors($content, $selector, $function = null) |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->html = $html; |
| 62 | 62 | |
| 63 | 63 | $random = rand(1000000000, 2147483647); |
| 64 | - $this->dynamic_session = $random . $random; |
|
| 64 | + $this->dynamic_session = $random.$random; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -76,14 +76,14 @@ discard block |
||
| 76 | 76 | public function login($login, $password) |
| 77 | 77 | { |
| 78 | 78 | // Referer header set only to act more like a browser |
| 79 | - $this->session->headers['Referer'] = $this->url . $this->login_request_uri; |
|
| 79 | + $this->session->headers['Referer'] = $this->url.$this->login_request_uri; |
|
| 80 | 80 | |
| 81 | 81 | $this->session->data = array( |
| 82 | 82 | '_dyncharset' => 'UTF-8', |
| 83 | 83 | '_dynSessConf' => $this->dynamic_session, |
| 84 | - '/tp/core/profile/login/ProfileLoginFormHandler.loginErrorURL' => $this->url . $this->login_request_uri, |
|
| 84 | + '/tp/core/profile/login/ProfileLoginFormHandler.loginErrorURL' => $this->url.$this->login_request_uri, |
|
| 85 | 85 | '_D:/tp/core/profile/login/ProfileLoginFormHandler.loginErrorURL' => '', |
| 86 | - '/tp/core/profile/login/ProfileLoginFormHandler.loginSuccessURL' => $this->url . $this->send_request_uri, |
|
| 86 | + '/tp/core/profile/login/ProfileLoginFormHandler.loginSuccessURL' => $this->url.$this->send_request_uri, |
|
| 87 | 87 | '_D:/tp/core/profile/login/ProfileLoginFormHandler.loginSuccessURL' => '', |
| 88 | 88 | '/tp/core/profile/login/ProfileLoginFormHandler.firstEnter' => 'true', |
| 89 | 89 | '_D:/tp/core/profile/login/ProfileLoginFormHandler.firstEnter' => '', |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | '_DARGS' => '/ocp/gear/infoportal/portlets/login/login-box.jsp' |
| 98 | 98 | ); |
| 99 | 99 | |
| 100 | - $response = $this->session->post($this->login_request_uri . $this->login_post_query_string); |
|
| 100 | + $response = $this->session->post($this->login_request_uri.$this->login_post_query_string); |
|
| 101 | 101 | |
| 102 | 102 | // TODO: Proof, that user logged in (other than token) |
| 103 | 103 | $this->logged_in = true; |
@@ -178,13 +178,13 @@ discard block |
||
| 178 | 178 | $this->checkLoggedIn(); |
| 179 | 179 | |
| 180 | 180 | if (strlen($text) <= 0 || strlen($text) > $this->max_length) { |
| 181 | - throw new \Exception('The message must be longer than 0 characters, but shorter than ' . $this->max_length . ' characters'); |
|
| 181 | + throw new \Exception('The message must be longer than 0 characters, but shorter than '.$this->max_length.' characters'); |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $this->session->options['timeout'] = 30; |
| 185 | 185 | |
| 186 | 186 | // Referer header set only to act more like a browser |
| 187 | - $this->session->headers['Referer'] = $this->url . $this->send_request_uri; |
|
| 187 | + $this->session->headers['Referer'] = $this->url.$this->send_request_uri; |
|
| 188 | 188 | |
| 189 | 189 | $this->session->data = array( |
| 190 | 190 | '_dyncharset' => 'UTF-8', |
@@ -361,8 +361,8 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | foreach ($elements as $key => $item) { |
| 363 | 363 | |
| 364 | - $details = (!empty($function)) ? 'Function ' . $function . ' returned: ' : null; |
|
| 365 | - $message .= $details . trim($item->plaintext) . '; '; |
|
| 364 | + $details = (!empty($function)) ? 'Function '.$function.' returned: ' : null; |
|
| 365 | + $message .= $details.trim($item->plaintext).'; '; |
|
| 366 | 366 | |
| 367 | 367 | } |
| 368 | 368 | |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | |
| 425 | 425 | } else { |
| 426 | 426 | |
| 427 | - $errors[$key] = 'No integer value found for key indexed ' . $key . '. Retrieved value: "' . $value . '"'; |
|
| 427 | + $errors[$key] = 'No integer value found for key indexed '.$key.'. Retrieved value: "'.$value.'"'; |
|
| 428 | 428 | |
| 429 | 429 | } |
| 430 | 430 | |