@@ -15,10 +15,10 @@ |
||
| 15 | 15 | |
| 16 | 16 | $fields = new FieldList(); |
| 17 | 17 | |
| 18 | - $fields->push( new TabSet( "Root", $mainTab = new Tab( "Main" ) ) ); |
|
| 19 | - $mainTab->setTitle( _t( 'SiteTree.TABMAIN', "Main" ) ); |
|
| 18 | + $fields->push(new TabSet("Root", $mainTab = new Tab("Main"))); |
|
| 19 | + $mainTab->setTitle(_t('SiteTree.TABMAIN', "Main")); |
|
| 20 | 20 | |
| 21 | - $fields->addFieldToTab( 'Root.Main', $nf = new TextField( 'Name', 'Name') ); |
|
| 21 | + $fields->addFieldToTab('Root.Main', $nf = new TextField('Name', 'Name')); |
|
| 22 | 22 | $nf->setReadOnly(true); |
| 23 | 23 | $nf->setDisabled(true); |
| 24 | 24 | |
@@ -24,10 +24,10 @@ |
||
| 24 | 24 | |
| 25 | 25 | function getCMSFields() { |
| 26 | 26 | $fields = new FieldList(); |
| 27 | - $fields->push( new TabSet( "Root", $mainTab = new Tab( "Main" ) ) ); |
|
| 28 | - $mainTab->setTitle( _t( 'SiteTree.TABMAIN', "Main" ) ); |
|
| 29 | - $fields->addFieldToTab( 'Root.Main', $cf = new TextField( 'ClazzName', 'Class sourced from') ); |
|
| 30 | - $fields->addFieldToTab( 'Root.Main', $nf = new TextField( 'Name', 'Name') ); |
|
| 27 | + $fields->push(new TabSet("Root", $mainTab = new Tab("Main"))); |
|
| 28 | + $mainTab->setTitle(_t('SiteTree.TABMAIN', "Main")); |
|
| 29 | + $fields->addFieldToTab('Root.Main', $cf = new TextField('ClazzName', 'Class sourced from')); |
|
| 30 | + $fields->addFieldToTab('Root.Main', $nf = new TextField('Name', 'Name')); |
|
| 31 | 31 | $cf->setDisabled(true); |
| 32 | 32 | $nf->setDisabled(true); |
| 33 | 33 | $cf->setReadOnly(true); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | // Makes most sense to only provide one field here, e.g. Title, Name |
| 21 | 21 | $field = $this->request->getVar('field'); |
| 22 | 22 | |
| 23 | - error_log('QUERY:'.$query); |
|
| 23 | + error_log('QUERY:' . $query); |
|
| 24 | 24 | |
| 25 | 25 | // start, and page length, i.e. pagination |
| 26 | 26 | $es->setPageLength(10); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $es->addFilter('InSiteTree', true); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - $resultList = $es->autocomplete_search($query,$field); |
|
| 35 | + $resultList = $es->autocomplete_search($query, $field); |
|
| 36 | 36 | $result = array(); |
| 37 | 37 | $result['Query'] = $query; |
| 38 | 38 | $suggestions = array(); |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | $originalParts = explode(' ', $originalQuery); |
| 59 | 59 | $suggestedParts = explode(' ', $suggestedPhrase); |
| 60 | 60 | |
| 61 | - $markedHighlightedParts = ' '.$suggestedPhraseHighlighted.' '; |
|
| 62 | - $markedHighlightedParts = str_replace(' '.$preTags, ' '.self::$pre_marker, $markedHighlightedParts); |
|
| 61 | + $markedHighlightedParts = ' ' . $suggestedPhraseHighlighted . ' '; |
|
| 62 | + $markedHighlightedParts = str_replace(' ' . $preTags, ' ' . self::$pre_marker, $markedHighlightedParts); |
|
| 63 | 63 | |
| 64 | - $markedHighlightedParts = str_replace($postTags.' ', self::$post_marker, $markedHighlightedParts); |
|
| 64 | + $markedHighlightedParts = str_replace($postTags . ' ', self::$post_marker, $markedHighlightedParts); |
|
| 65 | 65 | |
| 66 | 66 | $markedHighlightedParts = trim($markedHighlightedParts); |
| 67 | 67 | $markedHighlightedParts = trim($markedHighlightedParts); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } else { |
| 92 | 92 | //Need to check capitalisation of terms suggested that are different |
| 93 | 93 | |
| 94 | - $chr = mb_substr ($possiblyUppercase, 0, 1, "UTF-8"); |
|
| 94 | + $chr = mb_substr($possiblyUppercase, 0, 1, "UTF-8"); |
|
| 95 | 95 | if (mb_strtolower($chr, "UTF-8") != $chr) { |
| 96 | 96 | $upperLowercaseWord = $lowercaseWord; |
| 97 | 97 | $upperLowercaseWord[0] = $chr; |
@@ -115,9 +115,9 @@ discard block |
||
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - $highlighted = ' '.implode(' ', $highlighted).' '; |
|
| 119 | - $highlighted = str_replace(self::$pre_marker, ' '.$preTags, $highlighted); |
|
| 120 | - $highlighted = str_replace(self::$post_marker, $postTags.' ', $highlighted); |
|
| 118 | + $highlighted = ' ' . implode(' ', $highlighted) . ' '; |
|
| 119 | + $highlighted = str_replace(self::$pre_marker, ' ' . $preTags, $highlighted); |
|
| 120 | + $highlighted = str_replace(self::$post_marker, $postTags . ' ', $highlighted); |
|
| 121 | 121 | |
| 122 | 122 | $resultArray['suggestedQuery'] = implode(' ', $plain); |
| 123 | 123 | $resultArray['suggestedQueryHighlighted'] = trim($highlighted); |
@@ -146,10 +146,10 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | $bracketPos = strpos($explanation, ')~'); |
| 148 | 148 | |
| 149 | - if (substr($explanation, 0,2) == '((') { |
|
| 150 | - $explanation = substr($explanation, 2, $bracketPos-2); |
|
| 151 | - } elseif (substr($explanation, 0,1) == '(') { |
|
| 152 | - $explanation = substr($explanation, 1, $bracketPos-2); |
|
| 149 | + if (substr($explanation, 0, 2) == '((') { |
|
| 150 | + $explanation = substr($explanation, 2, $bracketPos - 2); |
|
| 151 | + } elseif (substr($explanation, 0, 1) == '(') { |
|
| 152 | + $explanation = substr($explanation, 1, $bracketPos - 2); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $terms = array(); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | public function setUp() { |
| 23 | 23 | // this needs to be called in order to create the list of searchable |
| 24 | 24 | // classes and fields that are available. Simulates part of a build |
| 25 | - $classes = array('SearchableTestPage','SiteTree','Page','FlickrPhotoTO','FlickrSetTO', |
|
| 25 | + $classes = array('SearchableTestPage', 'SiteTree', 'Page', 'FlickrPhotoTO', 'FlickrSetTO', |
|
| 26 | 26 | 'FlickrTagTO', 'FlickrAuthorTO', 'FlickrSetTO'); |
| 27 | 27 | $this->requireDefaultRecordsFrom = $classes; |
| 28 | 28 | // load fixtures |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $es->setLocale($locale); |
| 22 | 22 | $es->setClasses('FlickrPhotoTO'); |
| 23 | 23 | |
| 24 | - $fields = array('Description' => 1,'Title' => 1); |
|
| 24 | + $fields = array('Description' => 1, 'Title' => 1); |
|
| 25 | 25 | $results = $es->search('New Zealind', $fields, true); |
| 26 | 26 | |
| 27 | 27 | $this->assertEquals('New Zealand', $es->getSuggestedQuery()); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $es->setLocale($locale); |
| 49 | 49 | $es->setClasses('FlickrPhotoTO'); |
| 50 | 50 | |
| 51 | - $fields = array('Description.standard' => 1,'Title.standard' => 1); |
|
| 51 | + $fields = array('Description.standard' => 1, 'Title.standard' => 1); |
|
| 52 | 52 | $results = $es->moreLikeThis($fp, $fields, true); |
| 53 | 53 | |
| 54 | 54 | echo "RESULTS:\n"; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $expected = array('texas'); |
| 70 | 70 | $this->assertEquals($expected, $terms['Title.standard']); |
| 71 | 71 | |
| 72 | - $expected = array('new', 'see','photographs', 'information','resolution', 'company', 'view', |
|
| 72 | + $expected = array('new', 'see', 'photographs', 'information', 'resolution', 'company', 'view', |
|
| 73 | 73 | 'high', 'collection', 'pacific', 'orleans', 'degolyer', 'southern', 'everett', |
| 74 | 74 | 'railroad', 'texas'); |
| 75 | 75 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $fields = array('Title.standard' => 1, 'Description.standard' => 1); |
| 138 | 138 | $paginated = $es->moreLikeThis($fp, $fields, true); |
| 139 | 139 | foreach ($paginated->getList() as $result) { |
| 140 | - echo $result->ID. ' : '.$result->Title."\n"; |
|
| 140 | + echo $result->ID . ' : ' . $result->Title . "\n"; |
|
| 141 | 141 | } |
| 142 | 142 | $this->assertEquals(32, $paginated->getTotalItems()); |
| 143 | 143 | $results = $paginated->getList()->toArray(); |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $fields = array('Title.standard' => 1, 'Description.standard' => 1); |
| 164 | 164 | $paginated = $es->moreLikeThis($fp, $fields, true); |
| 165 | 165 | foreach ($paginated->getList() as $result) { |
| 166 | - echo $result->ID. ' : '.$result->Title."\n"; |
|
| 166 | + echo $result->ID . ' : ' . $result->Title . "\n"; |
|
| 167 | 167 | } |
| 168 | 168 | $this->assertEquals(14, $paginated->getTotalItems()); |
| 169 | 169 | $results = $paginated->getList()->toArray(); |
@@ -226,12 +226,12 @@ discard block |
||
| 226 | 226 | $wordFound = false; |
| 227 | 227 | $lcquery = explode(' ', strtolower($query)); |
| 228 | 228 | foreach ($lcquery as $part) { |
| 229 | - $bracketed = '<strong class="hl">'.$part.'</strong>'; |
|
| 229 | + $bracketed = '<strong class="hl">' . $part . '</strong>'; |
|
| 230 | 230 | if (strpos($snippet, $bracketed) > 0) { |
| 231 | 231 | $wordFound = true; |
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | - $this->assertTrue($wordFound,'Highlight should have been found'); |
|
| 234 | + $this->assertTrue($wordFound, 'Highlight should have been found'); |
|
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | } |
@@ -256,12 +256,12 @@ discard block |
||
| 256 | 256 | $wordFound = false; |
| 257 | 257 | $lcquery = explode(' ', strtolower($query)); |
| 258 | 258 | foreach ($lcquery as $part) { |
| 259 | - $bracketed = '<strong class="hl">'.$part.'</strong>'; |
|
| 259 | + $bracketed = '<strong class="hl">' . $part . '</strong>'; |
|
| 260 | 260 | if (strpos($snippet, $bracketed) > 0) { |
| 261 | 261 | $wordFound = true; |
| 262 | 262 | } |
| 263 | 263 | } |
| 264 | - $this->assertTrue($wordFound,'Highlight should have been found'); |
|
| 264 | + $this->assertTrue($wordFound, 'Highlight should have been found'); |
|
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | } |
@@ -283,9 +283,9 @@ discard block |
||
| 283 | 283 | private function makeCode($paginated) { |
| 284 | 284 | $results = $paginated->getList()->toArray(); |
| 285 | 285 | $ctr = 0; |
| 286 | - echo '$result = $paginated->getList()->toArray();'."\n"; |
|
| 286 | + echo '$result = $paginated->getList()->toArray();' . "\n"; |
|
| 287 | 287 | foreach ($results as $result) { |
| 288 | - echo '$this->assertEquals("'.$result->Title.'", $results['.$ctr.']->Title);'."\n"; |
|
| 288 | + echo '$this->assertEquals("' . $result->Title . '", $results[' . $ctr . ']->Title);' . "\n"; |
|
| 289 | 289 | $ctr++; |
| 290 | 290 | } |
| 291 | 291 | } |
@@ -9,8 +9,8 @@ discard block |
||
| 9 | 9 | public static $ignoreFixtureFileFor = array(); |
| 10 | 10 | |
| 11 | 11 | protected $extraDataObjects = array( |
| 12 | - 'SearchableTestPage','FlickrPhotoTO','FlickrAuthorTO','FlickrSetTO','FlickrTagTO', |
|
| 13 | - 'SearchableTestFatherPage','SearchableTestGrandFatherPage','AutoCompleteOption' |
|
| 12 | + 'SearchableTestPage', 'FlickrPhotoTO', 'FlickrAuthorTO', 'FlickrSetTO', 'FlickrTagTO', |
|
| 13 | + 'SearchableTestFatherPage', 'SearchableTestGrandFatherPage', 'AutoCompleteOption' |
|
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | 16 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // this needs to be called in order to create the list of searchable |
| 41 | 41 | // classes and fields that are available. Simulates part of a build |
| 42 | - $classes = array('SearchableTestPage','SiteTree','Page','FlickrPhotoTO','FlickrSetTO', |
|
| 42 | + $classes = array('SearchableTestPage', 'SiteTree', 'Page', 'FlickrPhotoTO', 'FlickrSetTO', |
|
| 43 | 43 | 'FlickrTagTO', 'FlickrAuthorTO'); |
| 44 | 44 | $this->requireDefaultRecordsFrom = $classes; |
| 45 | 45 | |
@@ -61,13 +61,13 @@ discard block |
||
| 61 | 61 | $orig_fixture_file = static::$fixture_file; |
| 62 | 62 | |
| 63 | 63 | foreach (static::$ignoreFixtureFileFor as $testPattern) { |
| 64 | - $pattern = '/'.$testPattern.'/'; |
|
| 64 | + $pattern = '/' . $testPattern . '/'; |
|
| 65 | 65 | if (preg_match($pattern, $this->getName())) { |
| 66 | 66 | static::$fixture_file = null; |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - echo "\n\n\n\nEXECUTING TEST {$this->getName()}, FIXTURES=".static::$fixture_file."\n"; |
|
| 70 | + echo "\n\n\n\nEXECUTING TEST {$this->getName()}, FIXTURES=" . static::$fixture_file . "\n"; |
|
| 71 | 71 | |
| 72 | 72 | parent::setUp(); |
| 73 | 73 | static::$fixture_file = $orig_fixture_file; |
@@ -97,53 +97,53 @@ discard block |
||
| 97 | 97 | // temporarily disable Elasticsearch indexing, it will be done in a batch |
| 98 | 98 | $page->IndexingOff = true; |
| 99 | 99 | |
| 100 | - echo "Publishing ".$page->Title."\n"; |
|
| 101 | - $page->publish('Stage','Live'); |
|
| 100 | + echo "Publishing " . $page->Title . "\n"; |
|
| 101 | + $page->publish('Stage', 'Live'); |
|
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | public function generateAssertionsFromArray($toAssert) { |
| 107 | - echo '$expected = array('."\n"; |
|
| 107 | + echo '$expected = array(' . "\n"; |
|
| 108 | 108 | foreach ($toAssert as $key => $value) { |
| 109 | 109 | $escValue = str_replace("'", '\\\'', $value); |
| 110 | 110 | echo "'$key' => '$escValue',\n"; |
| 111 | 111 | } |
| 112 | 112 | echo ");\n"; |
| 113 | - echo '$this->assertEquals($expected, $somevar);'."\n"; |
|
| 113 | + echo '$this->assertEquals($expected, $somevar);' . "\n"; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | |
| 117 | 117 | public function generateAssertionsFromArray1D($toAssert) { |
| 118 | - echo '$expected = array('."\n"; |
|
| 118 | + echo '$expected = array(' . "\n"; |
|
| 119 | 119 | foreach ($toAssert as $key => $value) { |
| 120 | 120 | $escValue = str_replace("'", '\\\'', $value); |
| 121 | 121 | echo "'$escValue',"; |
| 122 | 122 | } |
| 123 | 123 | echo ");\n"; |
| 124 | - echo '$this->assertEquals($expected, $somevar);'."\n"; |
|
| 124 | + echo '$this->assertEquals($expected, $somevar);' . "\n"; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | public function generateAssertionsFromArrayRecurse($toAssert) { |
| 129 | 129 | echo '$expected = '; |
| 130 | - $this->recurseArrayAssertion($toAssert,1, 'FIXME'); |
|
| 131 | - echo '$this->assertEquals($expected, $somevar);'."\n"; |
|
| 130 | + $this->recurseArrayAssertion($toAssert, 1, 'FIXME'); |
|
| 131 | + echo '$this->assertEquals($expected, $somevar);' . "\n"; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | |
| 135 | 135 | private function recurseArrayAssertion($toAssert, $depth, $parentKey) { |
| 136 | - $prefix = str_repeat("\t",$depth); |
|
| 136 | + $prefix = str_repeat("\t", $depth); |
|
| 137 | 137 | echo "\t{$prefix}'$parentKey' => array(\n"; |
| 138 | 138 | $ctr = 0; |
| 139 | 139 | $len = sizeof(array_keys($toAssert)); |
| 140 | 140 | foreach ($toAssert as $key => $value) { |
| 141 | 141 | if (is_array($value)) { |
| 142 | - $this->recurseArrayAssertion($value, $depth+1, $key); |
|
| 142 | + $this->recurseArrayAssertion($value, $depth + 1, $key); |
|
| 143 | 143 | } else { |
| 144 | 144 | $escValue = str_replace("'", '\\\'', $value); |
| 145 | 145 | $comma = ','; |
| 146 | - if ($ctr == $len-1) { |
|
| 146 | + if ($ctr == $len - 1) { |
|
| 147 | 147 | $comma = ''; |
| 148 | 148 | } |
| 149 | 149 | echo "\t\t$prefix'$key' => '$escValue'$comma\n"; |
@@ -184,11 +184,11 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
| 187 | - public function checkFieldExists($tab,$fieldName) { |
|
| 187 | + public function checkFieldExists($tab, $fieldName) { |
|
| 188 | 188 | $fields = $tab->Fields(); |
| 189 | 189 | echo "TAB:{$tab->Name}\n"; |
| 190 | 190 | foreach ($fields as $fi) { |
| 191 | - echo "NAME:".$fi->Name."\n"; |
|
| 191 | + echo "NAME:" . $fi->Name . "\n"; |
|
| 192 | 192 | } |
| 193 | 193 | $field = $tab->fieldByName($fieldName); |
| 194 | 194 | $this->assertTrue($field != null); |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $numberDocsInIndex = $status['indices']['elastica_ss_module_test_en_us']['docs']['num_docs']; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - $this->assertEquals($expectedAmount,$numberDocsInIndex); |
|
| 228 | + $this->assertEquals($expectedAmount, $numberDocsInIndex); |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /* |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | parent::setup(); |
| 9 | 9 | $this->ElasticSearchPage = $this->objFromFixture('ElasticSearchPage', 'search'); |
| 10 | 10 | |
| 11 | - $this->ElasticSearchPage->SimilarityStopWords = 'a,the,which'; |
|
| 11 | + $this->ElasticSearchPage->SimilarityStopWords = 'a,the,which'; |
|
| 12 | 12 | $this->ElasticSearchPage->write(); |
| 13 | 13 | |
| 14 | 14 | $this->Validator = $this->ElasticSearchPage->getCMSValidator(); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | 'AutoCompleteFieldID' => null, |
| 35 | 35 | 'AutoCompleteFunctionID' => null, |
| 36 | 36 | 'SearchHelper' => null, |
| 37 | - 'SimilarityStopWords' => array('a', 'an', 'the', ), |
|
| 37 | + 'SimilarityStopWords' => array('a', 'an', 'the',), |
|
| 38 | 38 | 'MinTermFreq' => 2, |
| 39 | 39 | 'MaxTermFreq' => 25, |
| 40 | 40 | 'MinDocFreq' => 2, |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $esp->Identifier = 'THISWILLBECOPIED'; |
| 103 | 103 | $esp->write(); |
| 104 | 104 | $this->checkForError('Identifier', 'THISWILLBECOPIED', |
| 105 | - 'The identifier THISWILLBECOPIED already exists' ); |
|
| 105 | + 'The identifier THISWILLBECOPIED already exists'); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | |
@@ -126,9 +126,9 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | foreach ($errors as $error) { |
| 128 | 128 | echo "Checking error\n"; |
| 129 | - echo " - " . $error['fieldName'].' => '.$error['message']."\n"; |
|
| 130 | - echo "\tT1:".($error['message'] == $message); |
|
| 131 | - echo "\n\tT2:".($error['fieldName'] == $fieldName); |
|
| 129 | + echo " - " . $error['fieldName'] . ' => ' . $error['message'] . "\n"; |
|
| 130 | + echo "\tT1:" . ($error['message'] == $message); |
|
| 131 | + echo "\n\tT2:" . ($error['fieldName'] == $fieldName); |
|
| 132 | 132 | |
| 133 | 133 | if ($error['message'] == $message && $error['fieldName'] == $fieldName) { |
| 134 | 134 | $found = true; |
@@ -8,8 +8,8 @@ discard block |
||
| 8 | 8 | public static $ignoreFixtureFileFor = array(); |
| 9 | 9 | |
| 10 | 10 | protected $extraDataObjects = array( |
| 11 | - 'SearchableTestPage','FlickrPhotoTO','FlickrAuthorTO','FlickrSetTO','FlickrTagTO', |
|
| 12 | - 'SearchableTestFatherPage','SearchableTestGrandFatherPage' |
|
| 11 | + 'SearchableTestPage', 'FlickrPhotoTO', 'FlickrAuthorTO', 'FlickrSetTO', 'FlickrTagTO', |
|
| 12 | + 'SearchableTestFatherPage', 'SearchableTestGrandFatherPage' |
|
| 13 | 13 | ); |
| 14 | 14 | |
| 15 | 15 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // this needs to be called in order to create the list of searchable |
| 31 | 31 | // classes and fields that are available. Simulates part of a build |
| 32 | - $classes = array('SearchableTestPage','SiteTree','Page','FlickrPhotoTO','FlickrSetTO', |
|
| 32 | + $classes = array('SearchableTestPage', 'SiteTree', 'Page', 'FlickrPhotoTO', 'FlickrSetTO', |
|
| 33 | 33 | 'FlickrTagTO', 'FlickrAuthorTO'); |
| 34 | 34 | $this->requireDefaultRecordsFrom = $classes; |
| 35 | 35 | |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | print_r(static::$ignoreFixtureFileFor); |
| 61 | 61 | |
| 62 | 62 | foreach (static::$ignoreFixtureFileFor as $testPattern) { |
| 63 | - $pattern = '/'.$testPattern.'/'; |
|
| 64 | - echo "GREP: $pattern against ".$this->getName()."\n"; |
|
| 63 | + $pattern = '/' . $testPattern . '/'; |
|
| 64 | + echo "GREP: $pattern against " . $this->getName() . "\n"; |
|
| 65 | 65 | if (preg_match($pattern, $this->getName())) { |
| 66 | 66 | static::$fixture_file = null; |
| 67 | 67 | } |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | // temporarily disable Elasticsearch indexing, it will be done in a batch |
| 89 | 89 | $page->IndexingOff = true; |
| 90 | 90 | |
| 91 | - echo "Publishing ".$page->Title."\n"; |
|
| 92 | - $page->publish('Stage','Live'); |
|
| 91 | + echo "Publishing " . $page->Title . "\n"; |
|
| 92 | + $page->publish('Stage', 'Live'); |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $text = strip_tags($item); |
| 116 | 116 | $escaped = str_replace("'", "\'", $text); |
| 117 | 117 | echo "SELECTED:\$this->assertSelectorStartsWithOrEquals('{$selector}', $ctr, '$escaped');\n"; |
| 118 | - echo "ITEM:".$item."\n"; |
|
| 118 | + echo "ITEM:" . $item . "\n"; |
|
| 119 | 119 | $ctr++; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $result = array(); |
| 172 | 172 | foreach ($items as $item) { |
| 173 | 173 | $attr = $item->attributes()->id; |
| 174 | - array_push($result, $attr.""); |
|
| 174 | + array_push($result, $attr . ""); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | return $result; |