@@ -727,7 +727,7 @@ |
||
727 | 727 | */ |
728 | 728 | private function addJSGlobals() |
729 | 729 | { |
730 | - $this->body = $this->body.'<script> |
|
730 | + $this->body = $this->body.'<script> |
|
731 | 731 | var profilesUrl = \''.$this->profilesUrl.'\' |
732 | 732 | var loginUrl = \''.$this->loginUrl.'\' |
733 | 733 | var logoutUrl = \''.$this->logoutUrl.'\' |
@@ -27,9 +27,11 @@ |
||
27 | 27 | { |
28 | 28 | // build a replacement array with braces around the context keys |
29 | 29 | $replace = array(); |
30 | - foreach ($context as $key => $val) { |
|
30 | + foreach ($context as $key => $val) |
|
31 | + { |
|
31 | 32 | // check that the value can be casted to string |
32 | - if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { |
|
33 | + if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) |
|
34 | + { |
|
33 | 35 | $replace['{' . $key . '}'] = $val; |
34 | 36 | } |
35 | 37 | } |
@@ -40,9 +40,12 @@ discard block |
||
40 | 40 | $args = array(); |
41 | 41 | $args['RawMessage'] = array(); |
42 | 42 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
43 | - try { |
|
43 | + try |
|
44 | + { |
|
44 | 45 | return $this->ses->sendRawEmail($args); |
45 | - } catch(\Exception $e) { |
|
46 | + } |
|
47 | + catch(\Exception $e) |
|
48 | + { |
|
46 | 49 | return false; |
47 | 50 | } |
48 | 51 | } |
@@ -63,9 +66,12 @@ discard block |
||
63 | 66 | $args['Message']['Body']['Text']['Data'] = $email->getTextBody(); |
64 | 67 | $args['Message']['Body']['Html']['Data'] = $email->getHtmlBody(); |
65 | 68 | $args['ReplyToAddresses'] = array($email->getReplyTo()); |
66 | - try { |
|
69 | + try |
|
70 | + { |
|
67 | 71 | return $this->ses->sendEmail($args); |
68 | - } catch(\Exception $e) { |
|
72 | + } |
|
73 | + catch(\Exception $e) |
|
74 | + { |
|
69 | 75 | return false; |
70 | 76 | } |
71 | 77 | } |
@@ -13,5 +13,5 @@ |
||
13 | 13 | ->withStatus(500) |
14 | 14 | ->withHeader('Content-Type', 'text/html') |
15 | 15 | ->write(print_r($exception, true)); |
16 | - } |
|
16 | + } |
|
17 | 17 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $odata = $request->getAttribute('odata', new \ODataParams(array())); |
92 | 92 | $params = $this->manipulateParameters($request, $odata); |
93 | 93 | $areas = $dataTable->read($odata->filter, $odata->select, $odata->top, |
94 | - $odata->skip, $odata->orderby, $params); |
|
94 | + $odata->skip, $odata->orderby, $params); |
|
95 | 95 | if($areas === false) |
96 | 96 | { |
97 | 97 | $areas = array(); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $odata = $request->getAttribute('odata', new \ODataParams(array())); |
134 | 134 | $filter = $this->getFilterForPrimaryKey($args['name']); |
135 | 135 | $areas = $dataTable->read($filter, $odata->select, $odata->top, |
136 | - $odata->skip, $odata->orderby); |
|
136 | + $odata->skip, $odata->orderby); |
|
137 | 137 | if(empty($areas)) |
138 | 138 | { |
139 | 139 | return $response->withStatus(404); |
@@ -13,7 +13,9 @@ discard block |
||
13 | 13 | $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true]); |
14 | 14 | parent::__construct($settings); |
15 | 15 | $c = $this->getContainer(); |
16 | - $c['errorHandler'] = function($c) { return new WebErrorHandler();}; |
|
16 | + $c['errorHandler'] = function($c) |
|
17 | + { |
|
18 | +return new WebErrorHandler();}; |
|
17 | 19 | $this->add(new AuthMiddleware()); |
18 | 20 | $this->add(new ODataMiddleware()); |
19 | 21 | } |
@@ -25,7 +27,9 @@ discard block |
||
25 | 27 | |
26 | 28 | public function registerAPI($uri, $api) |
27 | 29 | { |
28 | - $group = $this->group($uri, function() use($api){$api->setup($this);}); |
|
30 | + $group = $this->group($uri, function() use($api) |
|
31 | + { |
|
32 | +$api->setup($this);}); |
|
29 | 33 | $group->add(new \Http\Rest\SerializationMiddleware()); |
30 | 34 | $group->add(new \Http\Rest\CORSMiddleware($this->getContainer())); |
31 | 35 | } |