Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
typehint + fix php-cs-fixer
  • Loading branch information
arnaud committed Oct 31, 2018
commit e9f52c33c92b69b52d38f2d6e4e5b77de752ae55
10 changes: 3 additions & 7 deletions src/Traits/HandlesRelationships.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,13 @@ protected function getNestedRelation($include): array
return [$nestedInclude, $include];
}

/**
* @param $returnType
* @return bool
*/
protected function isRelationshipReturntype($returnType): bool
protected function isRelationshipReturntype(\ReflectionType $returnType): bool
{
/**
* compatibility php7.0 & php7.1+
* compatibility php7.0 & php7.1+.
*/
$returnTypeClassname = null;
if(is_callable([$returnType, 'getName'])) {
if (is_callable([$returnType, 'getName'])) {
$returnTypeClassname = $returnType->getName();
} else {
$returnTypeClassname = (string) $returnType;
Expand Down