@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $locale = \i18n::default_locale(); |
21 | 21 | $es->setLocale($locale); |
22 | 22 | $es->setClasses('FlickrPhotoTO'); |
23 | - $fields = array('Description' => 1,'Title' => 1); |
|
23 | + $fields = array('Description' => 1, 'Title' => 1); |
|
24 | 24 | $this->assertEquals('New Zealand', $es->getSuggestedQuery()); |
25 | 25 | } |
26 | 26 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $es->setLocale($locale); |
46 | 46 | $es->setClasses('FlickrPhotoTO'); |
47 | 47 | |
48 | - $fields = array('Description.standard' => 1,'Title.standard' => 1); |
|
48 | + $fields = array('Description.standard' => 1, 'Title.standard' => 1); |
|
49 | 49 | $results = $es->moreLikeThis($fp, $fields, true); |
50 | 50 | |
51 | 51 | echo "RESULTS:\n"; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $fields = array('Title.standard' => 1, 'Description.standard' => 1); |
131 | 131 | $paginated = $es->moreLikeThis($fp, $fields, true); |
132 | 132 | foreach ($paginated->getList() as $result) { |
133 | - echo $result->ID. ' : '.$result->Title."\n"; |
|
133 | + echo $result->ID . ' : ' . $result->Title . "\n"; |
|
134 | 134 | } |
135 | 135 | $this->assertEquals(32, $paginated->getTotalItems()); |
136 | 136 | $results = $paginated->getList()->toArray(); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $fields = array('Title.standard' => 1, 'Description.standard' => 1); |
157 | 157 | $paginated = $es->moreLikeThis($fp, $fields, true); |
158 | 158 | foreach ($paginated->getList() as $result) { |
159 | - echo $result->ID. ' : '.$result->Title."\n"; |
|
159 | + echo $result->ID . ' : ' . $result->Title . "\n"; |
|
160 | 160 | } |
161 | 161 | $this->assertEquals(14, $paginated->getTotalItems()); |
162 | 162 | $results = $paginated->getList()->toArray(); |
@@ -219,12 +219,12 @@ discard block |
||
219 | 219 | $wordFound = false; |
220 | 220 | $lcquery = explode(' ', strtolower($query)); |
221 | 221 | foreach ($lcquery as $part) { |
222 | - $bracketed = '<strong class="hl">'.$part.'</strong>'; |
|
222 | + $bracketed = '<strong class="hl">' . $part . '</strong>'; |
|
223 | 223 | if (strpos($snippet, $bracketed) > 0) { |
224 | 224 | $wordFound = true; |
225 | 225 | } |
226 | 226 | } |
227 | - $this->assertTrue($wordFound,'Highlight should have been found'); |
|
227 | + $this->assertTrue($wordFound, 'Highlight should have been found'); |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 | } |
@@ -249,12 +249,12 @@ discard block |
||
249 | 249 | $wordFound = false; |
250 | 250 | $lcquery = explode(' ', strtolower($query)); |
251 | 251 | foreach ($lcquery as $part) { |
252 | - $bracketed = '<strong class="hl">'.$part.'</strong>'; |
|
252 | + $bracketed = '<strong class="hl">' . $part . '</strong>'; |
|
253 | 253 | if (strpos($snippet, $bracketed) > 0) { |
254 | 254 | $wordFound = true; |
255 | 255 | } |
256 | 256 | } |
257 | - $this->assertTrue($wordFound,'Highlight should have been found'); |
|
257 | + $this->assertTrue($wordFound, 'Highlight should have been found'); |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 | } |
@@ -276,9 +276,9 @@ discard block |
||
276 | 276 | private function makeCode($paginated) { |
277 | 277 | $results = $paginated->getList()->toArray(); |
278 | 278 | $ctr = 0; |
279 | - echo '$result = $paginated->getList()->toArray();'."\n"; |
|
279 | + echo '$result = $paginated->getList()->toArray();' . "\n"; |
|
280 | 280 | foreach ($results as $result) { |
281 | - echo '$this->assertEquals("'.$result->Title.'", $results['.$ctr.']->Title);'."\n"; |
|
281 | + echo '$this->assertEquals("' . $result->Title . '", $results[' . $ctr . ']->Title);' . "\n"; |
|
282 | 282 | $ctr++; |
283 | 283 | } |
284 | 284 | } |