@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | if ($item->canEdit()) { |
268 | 268 | $fields = $this->getAllValidFields($className); |
269 | 269 | foreach ($fields as $field) { |
270 | - if (! $this->includeFieldTest($className, $field)) { |
|
270 | + if (!$this->includeFieldTest($className, $field)) { |
|
271 | 271 | continue; |
272 | 272 | } |
273 | 273 | if ($type === 'url') { |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $myStage = Versioned::get_stage(); |
320 | 320 | Versioned::set_stage(Versioned::DRAFT); |
321 | 321 | // is it on live and is live the same as draft |
322 | - $canBePublished = $item->isPublished() && ! $item->isModifiedOnDraft(); |
|
322 | + $canBePublished = $item->isPublished() && !$item->isModifiedOnDraft(); |
|
323 | 323 | $item->writeToStage(Versioned::DRAFT); |
324 | 324 | if ($canBePublished) { |
325 | 325 | $item->publishSingle(); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | |
353 | 353 | if (count($this->words) > 0) { |
354 | 354 | foreach ($this->getAllDataObjects() as $className) { |
355 | - if (! $this->includeClassTest($className)) { |
|
355 | + if (!$this->includeClassTest($className)) { |
|
356 | 356 | continue; |
357 | 357 | } |
358 | 358 | |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $fields = $this->getAllValidFields($className); |
361 | 361 | $filterAny = []; |
362 | 362 | foreach ($fields as $field) { |
363 | - if (! $this->includeFieldTest($className, $field)) { |
|
363 | + if (!$this->includeFieldTest($className, $field)) { |
|
364 | 364 | continue; |
365 | 365 | } |
366 | 366 | $filterAny[$field . ':PartialMatch'] = $this->words; |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $back = $this->config()->get('hours_back_for_recent') ?: 24; |
410 | 410 | $limit = $this->Config()->get('limit_per_class_for_recent') ?: 5; |
411 | 411 | $threshold = strtotime('-' . $back . ' hours', DBDatetime::now()->getTimestamp()); |
412 | - if (! $threshold) { |
|
412 | + if (!$threshold) { |
|
413 | 413 | $threshold = time() - 86400; |
414 | 414 | } |
415 | 415 | |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | } |
516 | 516 | $finder->saveCache(); |
517 | 517 | |
518 | - if (! empty($this->sortOverride)) { |
|
518 | + if (!empty($this->sortOverride)) { |
|
519 | 519 | return $list->sort($this->sortOverride); |
520 | 520 | } else { |
521 | 521 | return $list->sort(['SiteWideSearchSortValue' => 'ASC']); |
@@ -545,7 +545,7 @@ discard block |
||
545 | 545 | $testWords = array_unique($testWords); |
546 | 546 | foreach ($testWords as $wordKey => $word) { |
547 | 547 | //match a exact field to full words / one word |
548 | - $fullWords = ! (bool) $wordKey; |
|
548 | + $fullWords = !(bool) $wordKey; |
|
549 | 549 | if (false === $done) { |
550 | 550 | $count = 0; |
551 | 551 | foreach ($fieldValues as $fieldValue) { |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | |
664 | 664 | protected function includeClassTest(string $className): bool |
665 | 665 | { |
666 | - if (count($this->includedClassesWithSubClassess) && ! in_array($className, $this->includedClassesWithSubClassess, true)) { |
|
666 | + if (count($this->includedClassesWithSubClassess) && !in_array($className, $this->includedClassesWithSubClassess, true)) { |
|
667 | 667 | if ($this->debug) { |
668 | 668 | DB::alteration_message(' ... Skipping as not included ' . $className); |
669 | 669 | } |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | } elseif (count($this->includedFields) > 0) { |
690 | 690 | return in_array($field, $this->includedFields, true); |
691 | 691 | } elseif (count($this->excludedFields) > 0) { |
692 | - return ! in_array($field, $this->includedFields, true); |
|
692 | + return !in_array($field, $this->includedFields, true); |
|
693 | 693 | } else { |
694 | 694 | return false; |
695 | 695 | } |