Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteeinSource committed Jun 10, 2017
1 parent 5cac920 commit 41c1d6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Steein/SDK/SteeinResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function getApiObject($subclassName = null)
/**
* Удобный способ для создания коллекции ApiUser.
*
* @return \Steein\SDK\Support\Models\UserModel
* @return Support\Model|UserModel
* @throws SteeinSDKException
*/
public function getUserModel()
Expand All @@ -300,21 +300,17 @@ public function getUserModel()
/**
* Удобный способ для создания коллекции ApiPost.
*
* @param bool $first
* @return Support\Model|PostModel
*/
public function getPostModel($first = false)
public function getPostModel()
{
if($first == false)
return $this->factory->makeModel(PostModel::class);
else
return $this->factory->makeModel(PostModel::class);
return $this->factory->makeModel(PostModel::class);
}

/**
* Удобный способ для создания коллекции MediaModel.
*
* @return Support\Models\MediaModel
* @return Support\Model|MediaModel
* @throws SteeinSDKException
*/
public function getMediaModel()
Expand Down
2 changes: 2 additions & 0 deletions src/Steein/SDK/Support/ModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public function Identify($name, $class)

/**
* Удобный способ для создания коллекции Моделей
*
* @return Model
*/
public function makeModel($class)
{
Expand Down

0 comments on commit 41c1d6f

Please sign in to comment.