Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit dd9c2f9

Browse files
authored
Perf: Use fully qualified function names (#2)
1 parent 21fe0eb commit dd9c2f9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/HasByNonDependentSubqueryMacro.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ public function orDoesntHave($relationMethod, ?callable ...$constraints): Builde
7979
protected function apply($relationMethod, string $whereInMethod, ?callable ...$constraints): Builder
8080
{
8181
// Extract dot-chained expressions
82-
$relationMethods = is_string($relationMethod) ? explode('.', $relationMethod) : array_values($relationMethod);
82+
$relationMethods = \is_string($relationMethod) ? \explode('.', $relationMethod) : \array_values($relationMethod);
8383

8484
// Pick the first relation if exists
85-
if ($currentRelationMethod = array_shift($relationMethods)) {
85+
if ($currentRelationMethod = \array_shift($relationMethods)) {
8686
$this->applyForCurrentRelation(
8787
$currentRelationMethod,
8888
$whereInMethod,
8989
function (Relation $query) use ($relationMethods, $whereInMethod, $constraints) {
9090
// Apply optional constraints
91-
if ($currentConstraints = array_shift($constraints)) {
91+
if ($currentConstraints = \array_shift($constraints)) {
9292
$currentConstraints($query);
9393
}
9494
// Apply relations nested under
@@ -113,7 +113,7 @@ protected function applyForCurrentRelation(string $relationMethod, string $where
113113
{
114114
// Unlike a JOIN-based approach, you don't need give table aliases.
115115
// Table names are never conflicted.
116-
if (preg_match('/\s+as\s+/i', $relationMethod)) {
116+
if (\preg_match('/\s+as\s+/i', $relationMethod)) {
117117
throw new DomainException('Table aliases are not supported.');
118118
}
119119

0 commit comments

Comments
 (0)