diff --git a/config/components.php b/config/components.php index 4114cb18e7..2b316ddf82 100644 --- a/config/components.php +++ b/config/components.php @@ -233,7 +233,7 @@ $scoring['score'] += 16 * $score; $scoring['hits'] += 1; - // check for exact beginning matches + // check for exact beginning matches } elseif ( $options['words'] === false && Str::startsWith($lowerValue, $query) === true @@ -241,7 +241,7 @@ $scoring['score'] += 8 * $score; $scoring['hits'] += 1; - // check for exact query matches + // check for exact query matches } elseif ($matches = preg_match_all('!' . $exact . '!ui', $value, $r)) { $scoring['score'] += 2 * $score; $scoring['hits'] += $matches; diff --git a/src/Cms/Files.php b/src/Cms/Files.php index d75b1f26dd..f935bf9303 100644 --- a/src/Cms/Files.php +++ b/src/Cms/Files.php @@ -51,19 +51,19 @@ public function add($object): static if ($object instanceof self) { $this->data = [...$this->data, ...$object->data]; - // add a file by id + // add a file by id } elseif ( is_string($object) === true && $file = App::instance()->file($object) ) { $this->__set($file->id(), $file); - // add a file object + // add a file object } elseif ($object instanceof File) { $this->__set($object->id(), $object); - // give a useful error message on invalid input; - // silently ignore "empty" values for compatibility with existing setups + // give a useful error message on invalid input; + // silently ignore "empty" values for compatibility with existing setups } elseif (in_array($object, [null, false, true], true) !== true) { throw new InvalidArgumentException( message: 'You must pass a Files or File object or an ID of an existing file to the Files collection' diff --git a/src/Cms/PagePicker.php b/src/Cms/PagePicker.php index c0d40de3ab..7c4dda8fac 100644 --- a/src/Cms/PagePicker.php +++ b/src/Cms/PagePicker.php @@ -127,13 +127,13 @@ public function items(): Pages|null if (empty($this->options['query']) === true) { $items = $this->itemsForParent(); - // when subpage navigation is enabled, a parent - // might be passed in addition to the query. - // The parent then takes priority. + // when subpage navigation is enabled, a parent + // might be passed in addition to the query. + // The parent then takes priority. } elseif ($this->options['subpages'] === true && empty($this->options['parent']) === false) { $items = $this->itemsForParent(); - // search by query + // search by query } else { $items = $this->itemsForQuery(); } diff --git a/src/Cms/Pages.php b/src/Cms/Pages.php index e24871854e..4443e431ac 100644 --- a/src/Cms/Pages.php +++ b/src/Cms/Pages.php @@ -64,19 +64,19 @@ public function add($object): static if ($object instanceof self) { $this->data = [...$this->data, ...$object->data]; - // add a page by id + // add a page by id } elseif ( is_string($object) === true && $page = $site->find($object) ) { $this->__set($page->id(), $page); - // add a page object + // add a page object } elseif ($object instanceof Page) { $this->__set($object->id(), $object); - // give a useful error message on invalid input; - // silently ignore "empty" values for compatibility with existing setups + // give a useful error message on invalid input; + // silently ignore "empty" values for compatibility with existing setups } elseif (in_array($object, [null, false, true], true) !== true) { throw new InvalidArgumentException( message: 'You must pass a Pages or Page object or an ID of an existing page to the Pages collection' diff --git a/src/Cms/Users.php b/src/Cms/Users.php index 08d9e93dd2..c67d1fe11f 100644 --- a/src/Cms/Users.php +++ b/src/Cms/Users.php @@ -51,19 +51,19 @@ public function add($object): static if ($object instanceof self) { $this->data = [...$this->data, ...$object->data]; - // add a user by id + // add a user by id } elseif ( is_string($object) === true && $user = App::instance()->user($object) ) { $this->__set($user->id(), $user); - // add a user object + // add a user object } elseif ($object instanceof User) { $this->__set($object->id(), $object); - // give a useful error message on invalid input; - // silently ignore "empty" values for compatibility with existing setups + // give a useful error message on invalid input; + // silently ignore "empty" values for compatibility with existing setups } elseif (in_array($object, [null, false, true], true) !== true) { throw new InvalidArgumentException( message: 'You must pass a Users or User object or an ID of an existing user to the Users collection' diff --git a/src/Http/Environment.php b/src/Http/Environment.php index 6509ffd71b..2339cb5aca 100644 --- a/src/Http/Environment.php +++ b/src/Http/Environment.php @@ -178,11 +178,11 @@ public function detect( if ($options['allowed'] === '*' || $options['allowed'] === ['*']) { $this->detectAuto(true); - // fixed environments + // fixed environments } elseif (empty($options['allowed']) === false) { $this->detectAllowed($options['allowed']); - // secure auto-detection + // secure auto-detection } else { $this->detectAuto(); } diff --git a/src/Panel/Panel.php b/src/Panel/Panel.php index de979365c7..40c10b86d2 100644 --- a/src/Panel/Panel.php +++ b/src/Panel/Panel.php @@ -274,7 +274,7 @@ public static function response($result, array $options = []): Response message: 'The data could not be found' ); - // interpret strings as errors + // interpret strings as errors } elseif (is_string($result) === true) { $result = new Exception($result); } diff --git a/src/Parsley/Parsley.php b/src/Parsley/Parsley.php index a819ac41f9..1ddb7d4604 100644 --- a/src/Parsley/Parsley.php +++ b/src/Parsley/Parsley.php @@ -214,7 +214,7 @@ public function mergeOrAppend(array $block): void ) { $this->blocks[$lastIndex]['content']['text'] .= ' ' . $block['content']['text']; - // append + // append } else { $this->blocks[] = $block; } diff --git a/src/Toolkit/A.php b/src/Toolkit/A.php index be9053e84f..b69c071d87 100644 --- a/src/Toolkit/A.php +++ b/src/Toolkit/A.php @@ -510,7 +510,7 @@ public static function merge(array|int ...$arrays): array ) { $merged[] = $value; - // recursively merge the two array values + // recursively merge the two array values } elseif ( is_array($value) === true && isset($merged[$key]) === true && @@ -518,7 +518,7 @@ public static function merge(array|int ...$arrays): array ) { $merged[$key] = static::merge($merged[$key], $value, $mode); - // simply overwrite with the value from the second array + // simply overwrite with the value from the second array } else { $merged[$key] = $value; }