Skip to content

Commit f119ba6

Browse files
committed
Add clarifying comment
1 parent 94c05b2 commit f119ba6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Console/ModelsCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,9 @@ public function getPropertiesFromMethods($model)
572572
$reflectionClass = new ReflectionClass($model);
573573
$methodReflections = $reflectionClass->getMethods();
574574
if ($methodReflections) {
575-
$methodReflections = array_filter($methodReflections, function ($methodReflection) {
575+
// Filter out private methods because they can't be used to generate magic properties and HasAttributes'
576+
// methods that resemble mutators but aren't.
577+
$methodReflections = array_filter($methodReflections, function (\ReflectionMethod $methodReflection) {
576578
return !$methodReflection->isPrivate() && !(
577579
in_array(
578580
\Illuminate\Database\Eloquent\Concerns\HasAttributes::class,

0 commit comments

Comments
 (0)