Skip to content

Commit f0cff71

Browse files
committed
Convert whitespaces to spaces
1 parent f108da8 commit f0cff71

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

Middleware/Jsonp.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@
33
* JSONP Middleware Class for the Slim Framework
44
*
55
* Simple class to wrap the response of the application in an JSONP callback function.
6-
* The class is triggered when a get parameter of callback is found
6+
* The class is triggered when a get parameter of callback is found
77
*
88
* @author Tom van Oorschot <tomvanoorschot@gmail.com>
99
* @since 17-12-2012
1010
*/
11+
1112
class JSONPMiddleware extends \Slim\Middleware
1213
{
1314
public function call()
1415
{
15-
$callback = $this->app->request()->get('callback');
16+
$callback = $this->app->request()->get('callback');
1617

17-
//Fetch the body first
18-
$this->next->call();
18+
//Fetch the body first
19+
$this->next->call();
1920

20-
//If the JSONP callback parameter is set then wrap the response body in the original
21-
//callback string.
22-
if(!empty($callback)){
23-
//The response becomes a javascript response
24-
$this->app->contentType('application/javascript');
21+
//If the JSONP callback parameter is set then wrap the response body in the original
22+
//callback string.
23+
if(!empty($callback)){
24+
//The response becomes a javascript response
25+
$this->app->contentType('application/javascript');
2526

26-
$jsonp_response = htmlspecialchars($callback) . "(" .$this->app->response()->body() . ")";
27-
$this->app->response()->body($jsonp_response);
28-
}
29-
}
27+
$jsonp_response = htmlspecialchars($callback) . "(" .$this->app->response()->body() . ")";
28+
$this->app->response()->body($jsonp_response);
29+
}
30+
}
3031
}

0 commit comments

Comments
 (0)