@@ -40,12 +40,12 @@ |
||
| 40 | 40 | Environment::increaseMemoryLimitTo(-1); |
| 41 | 41 | $debug = $request->postVar('debug') ? 'checked="checked"' : ''; |
| 42 | 42 | $word = Convert::raw2sql($request->requestVar('word')); |
| 43 | - if (! is_string($word)) { |
|
| 43 | + if (!is_string($word)) { |
|
| 44 | 44 | $word = ''; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $replace = Convert::raw2sql($request->requestVar('replace')); |
| 48 | - if (! is_string($replace)) { |
|
| 48 | + if (!is_string($replace)) { |
|
| 49 | 49 | $replace = ''; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -285,8 +285,8 @@ |
||
| 285 | 285 | |
| 286 | 286 | protected function classCanBeIncluded(string $dataObjectClassName): bool |
| 287 | 287 | { |
| 288 | - if(count($this->excludedClasses) || count($this->includedClasses)) { |
|
| 289 | - if(!class_exists($dataObjectClassName)) { |
|
| 288 | + if (count($this->excludedClasses) || count($this->includedClasses)) { |
|
| 289 | + if (!class_exists($dataObjectClassName)) { |
|
| 290 | 290 | return false; |
| 291 | 291 | } |
| 292 | 292 | if (count($this->includedClasses)) { |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | _t(__CLASS__ . '.ReplaceToggle', 'Replace with ... (optional - make a backup first!)'), |
| 91 | 91 | [ |
| 92 | 92 | (new CheckboxField('ApplyReplace', 'Run replace (please make sure to make a backup first!)', $this->applyReplace)) |
| 93 | - ->setDescription('Check this to replace the searched value set above with its replacement value. Note that searches ignore uppercase / lowercase, but replace actions will only search and replace values with the same upper / lowercase.'), |
|
| 93 | + ->setDescription('Check this to replace the searched value set above with its replacement value. Note that searches ignore uppercase / lowercase, but replace actions will only search and replace values with the same upper / lowercase.'), |
|
| 94 | 94 | (new TextField('ReplaceWith', 'Replace (optional - careful!)', $this->replace ?? '')) |
| 95 | 95 | ->setAttribute('placeholder', 'e.g. contract - make sure to also tick checkbox below'), |
| 96 | 96 | ] |
@@ -134,13 +134,13 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | public function setQuickSearchType(string $s): SearchApi |
| 136 | 136 | { |
| 137 | - if($s === 'all') { |
|
| 137 | + if ($s === 'all') { |
|
| 138 | 138 | $this->isQuickSearch = false; |
| 139 | 139 | $this->quickSearchType = ''; |
| 140 | - } elseif($s === 'limited') { |
|
| 140 | + } elseif ($s === 'limited') { |
|
| 141 | 141 | $this->isQuickSearch = true; |
| 142 | 142 | $this->quickSearchType = ''; |
| 143 | - } elseif(class_exists($s)) { |
|
| 143 | + } elseif (class_exists($s)) { |
|
| 144 | 144 | $this->quickSearchType = $s; |
| 145 | 145 | $object = Injector::inst()->get($s); |
| 146 | 146 | $this->setIncludedClasses($object->getClassesToSearch()); |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | if ($this->debug) { |
| 340 | 340 | DB::alteration_message(' ... Searching in ' . $className); |
| 341 | 341 | } |
| 342 | - if(count($this->includedClasses) && !in_array($className, $this->includedClasses, true)) { |
|
| 342 | + if (count($this->includedClasses) && !in_array($className, $this->includedClasses, true)) { |
|
| 343 | 343 | continue; |
| 344 | 344 | } |
| 345 | 345 | if (!in_array($className, $this->excludedClasses, true)) { |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | $fields = $this->getAllValidFields($className); |
| 348 | 348 | $filterAny = []; |
| 349 | 349 | foreach ($fields as $field) { |
| 350 | - if(count($this->includedFields) && !in_array($field, $this->includedFields, true)) { |
|
| 350 | + if (count($this->includedFields) && !in_array($field, $this->includedFields, true)) { |
|
| 351 | 351 | continue; |
| 352 | 352 | } |
| 353 | 353 | |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | $array = []; |
| 411 | 411 | $classNames = $this->getAllDataObjects(); |
| 412 | 412 | foreach ($classNames as $className) { |
| 413 | - if(count($this->includedClasses) && !in_array($className, $this->includedClasses, true)) { |
|
| 413 | + if (count($this->includedClasses) && !in_array($className, $this->includedClasses, true)) { |
|
| 414 | 414 | continue; |
| 415 | 415 | } |
| 416 | 416 | if (!in_array($className, $this->excludedClasses, true)) { |
@@ -32,9 +32,9 @@ |
||
| 32 | 32 | 'limited' => 'Limited search', |
| 33 | 33 | ]; |
| 34 | 34 | $availableSearchClasses = self::available_quick_searches(); |
| 35 | - if(!empty($availableSearchClasses) > 0) { |
|
| 36 | - foreach($availableSearchClasses as $availableSearchClass) { |
|
| 37 | - $array[$availableSearchClass] = Injector::inst()->get($availableSearchClass)->getTitle(); |
|
| 35 | + if (!empty($availableSearchClasses) > 0) { |
|
| 36 | + foreach ($availableSearchClasses as $availableSearchClass) { |
|
| 37 | + $array[$availableSearchClass] = Injector::inst()->get($availableSearchClass)->getTitle(); |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | return $array; |