Skip to content

Commit a0e40dd

Browse files
author
Andrey Helldar
authored
Merge pull request #1 from andrey-helldar/analysis-ADeVgk
Apply fixes from StyleCI
2 parents 9f93403 + a2c8670 commit a0e40dd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/Eloquent/Concerns/HasCustomRelationships.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ protected function hasManyCustom(string $related, string $foreign_key = null, st
2222
$model = $this;
2323

2424
return $this->newHasManyCustom(
25-
$instance->newQuery(), $model, "{$foreign_table}.{$foreign_key}", $local_key
25+
$instance->newQuery(),
26+
$model,
27+
"{$foreign_table}.{$foreign_key}",
28+
$local_key
2629
);
2730
}
2831

src/Eloquent/Relations/HasManyCustomRelation.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public function addEagerConstraints(array $models)
6363
);
6464

6565
$this->query->{$where_in}(
66-
$this->foreign_key, $values
66+
$this->foreign_key,
67+
$values
6768
);
6869
}
6970

src/Support/ModelHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function model($model)
136136
}
137137

138138
if (is_string($model)) {
139-
return $this->models[$model] = new $model;
139+
return $this->models[$model] = new $model();
140140
}
141141

142142
throw new IncorrectModelException($model);

0 commit comments

Comments
 (0)