Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Commit a3e25e4

Browse files
committed
refactor return statement to ternary
1 parent f1e4ef3 commit a3e25e4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Traits/LoopFunctions.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,8 @@ function (\ReflectionProperty $property) use ($class) {
103103
}
104104
);
105105

106-
if ($asCollection) {
107-
return $collection;
108-
}
109-
110-
return $collection->all();
106+
return ! $asCollection
107+
? $collection->all()
108+
: $collection;
111109
}
112110
}

0 commit comments

Comments
 (0)