@@ -120,7 +120,7 @@ |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | // username can't contain #@/<>[]|{} |
| 123 | - if (preg_match("/[" . preg_quote("#@/<>[]|{}", "/") . "]/", $this->request->getName()) === 1) { |
|
| 123 | + if (preg_match("/[".preg_quote("#@/<>[]|{}", "/")."]/", $this->request->getName()) === 1) { |
|
| 124 | 124 | $errorList[ValidationError::NAME_INVALIDCHAR] = new ValidationError(ValidationError::NAME_INVALIDCHAR); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -358,7 +358,7 @@ |
||
| 358 | 358 | $routeMap = $this->routePathSegments($classSegment, $requestedAction); |
| 359 | 359 | |
| 360 | 360 | if ($routeMap[0] === Page404::class) { |
| 361 | - $routeMap = $this->routeSinglePathSegment($classSegment . '/' . $requestedAction); |
|
| 361 | + $routeMap = $this->routeSinglePathSegment($classSegment.'/'.$requestedAction); |
|
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | return $routeMap; |
@@ -25,14 +25,14 @@ |
||
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $paths = array( |
| 28 | - __DIR__ . '/' . $class . ".php", |
|
| 29 | - __DIR__ . '/DataObjects/' . $class . ".php", |
|
| 30 | - __DIR__ . '/Providers/' . $class . ".php", |
|
| 31 | - __DIR__ . '/Providers/Interfaces/' . $class . ".php", |
|
| 32 | - __DIR__ . '/Validation/' . $class . ".php", |
|
| 33 | - __DIR__ . '/Helpers/' . $class . ".php", |
|
| 34 | - __DIR__ . '/Helpers/Interfaces/' . $class . ".php", |
|
| 35 | - __DIR__ . '/' . $class . ".php", |
|
| 28 | + __DIR__.'/'.$class.".php", |
|
| 29 | + __DIR__.'/DataObjects/'.$class.".php", |
|
| 30 | + __DIR__.'/Providers/'.$class.".php", |
|
| 31 | + __DIR__.'/Providers/Interfaces/'.$class.".php", |
|
| 32 | + __DIR__.'/Validation/'.$class.".php", |
|
| 33 | + __DIR__.'/Helpers/'.$class.".php", |
|
| 34 | + __DIR__.'/Helpers/Interfaces/'.$class.".php", |
|
| 35 | + __DIR__.'/'.$class.".php", |
|
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | foreach ($paths as $file) { |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | return ucfirst($string); |
| 81 | 81 | } |
| 82 | 82 | else { |
| 83 | - return mb_strtoupper(mb_substr($string, 0, 1)) . mb_substr($string, 1); |
|
| 83 | + return mb_strtoupper(mb_substr($string, 0, 1)).mb_substr($string, 1); |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -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; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | public function get($url, $parameters = null, $headers = array()) |
| 54 | 54 | { |
| 55 | 55 | if ($parameters !== null && is_array($parameters)) { |
| 56 | - $getString = '?' . http_build_query($parameters); |
|
| 56 | + $getString = '?'.http_build_query($parameters); |
|
| 57 | 57 | $url .= $getString; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | if ($result === false) { |
| 70 | 70 | $error = curl_error($this->curlHandle); |
| 71 | - throw new CurlException('Remote request failed with error ' . $error); |
|
| 71 | + throw new CurlException('Remote request failed with error '.$error); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | return $result; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | if ($result === false) { |
| 100 | 100 | $error = curl_error($this->curlHandle); |
| 101 | - throw new CurlException('Remote request failed with error ' . $error); |
|
| 101 | + throw new CurlException('Remote request failed with error '.$error); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | return $result; |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | { |
| 64 | 64 | $this->whereClause .= ' AND (ip LIKE ? OR forwardedip LIKE ?)'; |
| 65 | 65 | $this->parameterList[] = $ipAddress; |
| 66 | - $this->parameterList[] = '%' . trim($ipAddress, '%') . '%'; |
|
| 66 | + $this->parameterList[] = '%'.trim($ipAddress, '%').'%'; |
|
| 67 | 67 | |
| 68 | 68 | return $this; |
| 69 | 69 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function getRequestToken() |
| 78 | 78 | { |
| 79 | - $endpoint = $this->oauthEndpoint . '/initiate&format=json&oauth_callback=oob'; |
|
| 79 | + $endpoint = $this->oauthEndpoint.'/initiate&format=json&oauth_callback=oob'; |
|
| 80 | 80 | |
| 81 | 81 | $parsedUrl = parse_url($endpoint); |
| 82 | 82 | $urlParameters = array(); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $data = $this->httpHelper->get($targetUrl, null); |
| 92 | 92 | |
| 93 | 93 | if ($data === false) { |
| 94 | - throw new Exception('Curl error: ' . $this->httpHelper->getError()); |
|
| 94 | + throw new Exception('Curl error: '.$this->httpHelper->getError()); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $token = json_decode($data); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | if (isset($token->error)) { |
| 104 | - throw new Exception('Error encountered while getting request token: ' . $token->error); |
|
| 104 | + throw new Exception('Error encountered while getting request token: '.$token->error); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | return $token; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | */ |
| 129 | 129 | public function callbackCompleted($oauthRequestToken, $oauthRequestSecret, $oauthVerifier) |
| 130 | 130 | { |
| 131 | - $endpoint = $this->oauthEndpoint . '/token&format=json'; |
|
| 131 | + $endpoint = $this->oauthEndpoint.'/token&format=json'; |
|
| 132 | 132 | |
| 133 | 133 | $requestConsumer = new OAuthConsumer($oauthRequestToken, $oauthRequestSecret); |
| 134 | 134 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $data = $this->httpHelper->get($targetUrl, null); |
| 147 | 147 | |
| 148 | 148 | if ($data === false) { |
| 149 | - throw new Exception('Curl error: ' . $this->httpHelper->getError()); |
|
| 149 | + throw new Exception('Curl error: '.$this->httpHelper->getError()); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | $token = json_decode($data); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | if (isset($token->error)) { |
| 159 | - throw new Exception('Error encountered while getting access token: ' . $token->error); |
|
| 159 | + throw new Exception('Error encountered while getting access token: '.$token->error); |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | return $token; |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function getIdentityTicket($oauthAccessToken, $oauthAccessSecret) |
| 174 | 174 | { |
| 175 | - $endpoint = $this->oauthEndpoint . '/identify&format=json'; |
|
| 175 | + $endpoint = $this->oauthEndpoint.'/identify&format=json'; |
|
| 176 | 176 | |
| 177 | 177 | $oauthToken = new OAuthToken($oauthAccessToken, $oauthAccessSecret); |
| 178 | 178 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $data = $this->httpHelper->get($targetUrl, null); |
| 190 | 190 | |
| 191 | 191 | if ($data === false) { |
| 192 | - throw new Exception('Curl error: ' . $this->httpHelper->getError()); |
|
| 192 | + throw new Exception('Curl error: '.$this->httpHelper->getError()); |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $decodedData = json_decode($data); |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | if ($data === false) { |
| 246 | - throw new Exception('Curl error: ' . $this->httpHelper->getError()); |
|
| 246 | + throw new Exception('Curl error: '.$this->httpHelper->getError()); |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | return json_decode($data); |
@@ -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 |