Skip to content

Commit

Permalink
Various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Feb 24, 2019
1 parent e558f01 commit 6cf2ba4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
CODE_OF_CONDUCT.md export-ignore
CONTRIBUTING.md export-ignore
phpunit.xml.dist export-ignore
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Comment extends Model

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for details.

## Credits

Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
verbose="true"
>
<testsuites>
<testsuite>
<testsuite name="BelongsToThrough Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/Relations/BelongsToThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function setRelationQueryConstraints(Builder $query)
if ($lastIndex === $index) {
$prev = $this->prefix.$prev; // TODO: Check if this line is really necessary. Its not covered by any of the tests.
}
if ($this->getParent()->getTable() == $model->getTable()) {
if ($this->getParent()->getTable() === $model->getTable()) {
$alias = $model->getTable().'_'.time();
$other = $alias.'.'.$prev;
$query->leftJoin(new Expression($model->getTable().' as '.$alias), $one, '=', $other);
Expand Down

0 comments on commit 6cf2ba4

Please sign in to comment.