From 89eca757e6daa569c44f195d1c66dbb14e1678af Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 28 Mar 2015 12:18:50 +1030 Subject: [PATCH] Give MappedMorphTo a more generic property name --- src/Core/Support/MappedMorphTo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Support/MappedMorphTo.php b/src/Core/Support/MappedMorphTo.php index 121d20a2c..f52a418ba 100644 --- a/src/Core/Support/MappedMorphTo.php +++ b/src/Core/Support/MappedMorphTo.php @@ -10,7 +10,7 @@ class MappedMorphTo extends MorphTo { * * @var string */ - protected $types; + protected $map; /** * Create a new morph to relationship instance. @@ -23,9 +23,9 @@ class MappedMorphTo extends MorphTo { * @param string $relation * @return void */ - public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey, $type, $relation, $types) + public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey, $type, $relation, $map) { - $this->types = $types; + $this->map = $map; parent::__construct($query, $parent, $foreignKey, $otherKey, $type, $relation); } @@ -38,6 +38,6 @@ class MappedMorphTo extends MorphTo { */ public function createModelByType($type) { - return new $this->types[$type]; + return new $this->map[$type]; } }