@@ -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 | ] |
@@ -195,7 +195,7 @@ |
||
| 195 | 195 | protected function workOutBoolean(string $fieldName, ?array $data = null, ?bool $default = false): bool |
| 196 | 196 | { |
| 197 | 197 | $val = isset($data['IsSubmitHiddenField']) ? !empty($data[$fieldName]) : $default; |
| 198 | - if(!$val) { |
|
| 198 | + if (!$val) { |
|
| 199 | 199 | return false; |
| 200 | 200 | } |
| 201 | 201 | return $val === '1' || $val === 'true' || $val === 'on' || $val === 'yes' || $val === true; |
@@ -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; |