@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | $this->get('api/v2/bookmarks'); |
61 | 61 | |
62 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
62 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
63 | 63 | |
64 | 64 | $this->assertNotEmpty($response['data'][0]['attributes']['threadline_html']); |
65 | 65 | $response = Hash::remove($response, 'data.{n}.attributes.threadline_html'); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $this->assertTrue($this->Bookmarks->exists(['entry_id' => 4, 'user_id' => 3])); |
210 | 210 | |
211 | 211 | $this->assertResponseCode(200); |
212 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
212 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
213 | 213 | $expected = [ |
214 | 214 | 'data' => [ |
215 | 215 | 'id' => 6, |
@@ -5,7 +5,7 @@ |
||
5 | 5 | Router::plugin( |
6 | 6 | 'Bookmarks', |
7 | 7 | ['path' => '/api/v2'], |
8 | - function ($routes) { |
|
8 | + function($routes) { |
|
9 | 9 | $routes->setExtensions(['json']); |
10 | 10 | $routes->resources('Bookmarks'); |
11 | 11 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function edit($id) |
86 | 86 | { |
87 | - $id = (int)$id; |
|
87 | + $id = (int) $id; |
|
88 | 88 | $bookmark = $this->getBookmark($id); |
89 | 89 | |
90 | 90 | $this->Bookmarks->patchEntity( |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function delete($id) |
111 | 111 | { |
112 | - $id = (int)$id; |
|
112 | + $id = (int) $id; |
|
113 | 113 | $bookmark = $this->getBookmark($id); |
114 | 114 | if (!$this->Bookmarks->delete($bookmark)) { |
115 | 115 | throw new GenericApiException('The bookmark could not be deleted.'); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $this->_loginUser(1); |
43 | 43 | $source = 2; |
44 | 44 | |
45 | - $readPostings = function () use ($source) { |
|
45 | + $readPostings = function() use ($source) { |
|
46 | 46 | $read = []; |
47 | 47 | $read['all'] = $this->Entries->find()->all()->count(); |
48 | 48 | $read['source'] = $this->Entries->find() |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $source = 2; |
79 | 79 | $target = 4; |
80 | 80 | |
81 | - $readPostings = function () use ($source, $target) { |
|
81 | + $readPostings = function() use ($source, $target) { |
|
82 | 82 | $read = []; |
83 | 83 | $read['all'] = $this->Entries->find()->all()->count(); |
84 | 84 | $read['source'] = $this->Entries->find() |
@@ -8,7 +8,7 @@ |
||
8 | 8 | Router::scope( |
9 | 9 | '/admin', |
10 | 10 | ['plugin' => 'Admin'], |
11 | - function ($routes) { |
|
11 | + function($routes) { |
|
12 | 12 | $routes->connect( |
13 | 13 | '/', |
14 | 14 | ['controller' => 'Admins', 'action' => 'index'] |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | { |
129 | 129 | $options += ['class' => '']; |
130 | 130 | // set breadcrumb item class for Bootstrap |
131 | - $options['class'] = $options['class'] . ' breadcrumb-item'; |
|
131 | + $options['class'] = $options['class'].' breadcrumb-item'; |
|
132 | 132 | // last item in breadcrump is current (active) page and not linked |
133 | 133 | if ($url === false) { |
134 | 134 | // set breadcrumb active item class for Bootstrap |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | PREG_SPLIT_NO_EMPTY |
154 | 154 | ); |
155 | 155 | if (empty($errors)) { |
156 | - return '<p>' . __('No log file found.') . '</p>'; |
|
156 | + return '<p>'.__('No log file found.').'</p>'; |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | $out = ''; |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | $_i = self::tagId(); |
165 | 165 | $_details = $e->details(); |
166 | 166 | if (!empty($_details)) { |
167 | - $out .= '<button class="btn btn-mini" style="float:right;" onclick="$(\'#' . $_i . '\').toggle(); return false;">' . __( |
|
167 | + $out .= '<button class="btn btn-mini" style="float:right;" onclick="$(\'#'.$_i.'\').toggle(); return false;">'.__( |
|
168 | 168 | 'Details' |
169 | - ) . '</button>' . "\n"; |
|
169 | + ).'</button>'."\n"; |
|
170 | 170 | } |
171 | - $out .= '<pre style="font-size: 10px;">' . "\n"; |
|
171 | + $out .= '<pre style="font-size: 10px;">'."\n"; |
|
172 | 172 | $out .= '<div class="row"><div class="span2" style="text-align: right">'; |
173 | 173 | $out .= $this->TimeH->formatTime($e->time(), 'eng'); |
174 | 174 | |
@@ -176,12 +176,12 @@ discard block |
||
176 | 176 | $out .= '<div class="span7">'; |
177 | 177 | $out .= $e->message(); |
178 | 178 | if (!empty($_details)) { |
179 | - $out .= '<span id="' . $_i . '" style="display: none;">' . "\n"; |
|
179 | + $out .= '<span id="'.$_i.'" style="display: none;">'."\n"; |
|
180 | 180 | $out .= $_details; |
181 | 181 | $out .= '</span>'; |
182 | 182 | } |
183 | 183 | $out .= '</div></div>'; |
184 | - $out .= '</pre>' . "\n"; |
|
184 | + $out .= '</pre>'."\n"; |
|
185 | 185 | if ($k++ > $_nErrorsToShow) { |
186 | 186 | break; |
187 | 187 | } |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | $anchors = ''; |
52 | 52 | foreach ($settingNames as $name) { |
53 | 53 | $out .= $this->tableRow($name, $Settings); |
54 | - $anchors .= '<a name="' . $name . '"></a>'; |
|
54 | + $anchors .= '<a name="'.$name.'"></a>'; |
|
55 | 55 | } |
56 | 56 | $key = $this->addHeader($options['nav-title']); |
57 | - $out = '<table class="table table-striped table-bordered table-condensed">' . |
|
58 | - $out . '</table>'; |
|
57 | + $out = '<table class="table table-striped table-bordered table-condensed">'. |
|
58 | + $out.'</table>'; |
|
59 | 59 | |
60 | 60 | $sh = ''; |
61 | 61 | if (!empty($options['sh'])) { |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | ); |
66 | 66 | } |
67 | 67 | |
68 | - $out = '<div id="navHeaderAnchor' . $key . '"></div>' . |
|
69 | - $sh . |
|
70 | - $anchors . |
|
71 | - '<h2 >' . $tableName . '</h2>' . |
|
68 | + $out = '<div id="navHeaderAnchor'.$key.'"></div>'. |
|
69 | + $sh. |
|
70 | + $anchors. |
|
71 | + '<h2 >'.$tableName.'</h2>'. |
|
72 | 72 | $out; |
73 | 73 | |
74 | 74 | return $out; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | [ |
112 | 112 | __d('nondynamic', $name), |
113 | 113 | $Settings[$name], |
114 | - "<p>" . __d('nondynamic', $name . '_exp') . "</p>", |
|
114 | + "<p>".__d('nondynamic', $name.'_exp')."</p>", |
|
115 | 115 | $this->Html->link( |
116 | 116 | __('edit'), |
117 | 117 | ['controller' => 'settings', 'action' => 'edit', $name], |
@@ -72,7 +72,7 @@ |
||
72 | 72 | */ |
73 | 73 | public function delete($id) |
74 | 74 | { |
75 | - $id = (int)$id; |
|
75 | + $id = (int) $id; |
|
76 | 76 | $exists = $this->Users->exists($id); |
77 | 77 | if (!$exists) { |
78 | 78 | $this->Flash->set(__('User not found.'), ['element' => 'error']); |
@@ -123,7 +123,7 @@ |
||
123 | 123 | |
124 | 124 | switch ($this->request->getData('mode')) { |
125 | 125 | case ('move'): |
126 | - $targetId = (int)$this->request->getData('targetCategory'); |
|
126 | + $targetId = (int) $this->request->getData('targetCategory'); |
|
127 | 127 | try { |
128 | 128 | $this->Categories->merge($category->get('id'), $targetId); |
129 | 129 | $this->Flash->set( |