Skip to content

Commit

Permalink
Merge pull request #144 from GrahamCampbell/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
scottrobertson committed Jul 29, 2014
2 parents 21c0d11 + d97da4b commit c27c42c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/Facade/FactoryMuffin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
*
* @method static void setSaveMethod(string $method) Set the method we use when saving objects.
* @method static void setDeleteMethod(string $method) Set the method we use when deleting objects.
* @method static object create(string $model, array $attr) Creates and saves in db an instance of the model.
* @method static object create(string $model, array $attr = array()) Creates and saves in db an instance of the model.
* @method static mixed save(object $object) Save our object to the db, and keep track of it.
* @method static object[] saved() Return an array of saved objects.
* @method static void deleteSaved() Call the delete method on any saved objects.
* @method static object instance(string $model, array $attr, bool $save) Return an instance of the model.
* @method static array attributesFor(string $model, array $attr, bool $save) Returns the mock attributes for the model.
* @method static void define(string $model, array $definition) Define a new model factory.
* @method static string|object generateAttr(string $kind, string $model, bool $save) Generate the attributes.
* @method static object instance(string $model, array $attr = array(), bool $save = false) Return an instance of the model.
* @method static array attributesFor(string $model, array $attr = array(), bool $save = false) Returns the mock attributes for the model.
* @method static void define(string $model, array $definition = array()) Define a new model factory.
* @method static string|object generateAttr(string $kind, string $model = null, bool $save = false) Generate the attributes.
* @method static void loadFactories(string|string[] $paths) Load the specified factories.
*
* @package League\FactoryMuffin\Facades
Expand Down Expand Up @@ -56,6 +56,8 @@ protected static function fmInstance()
/**
* Handle dynamic, static calls to the object.
*
* @codeCoverageIgnore
*
* @param string $method
* @param array $args
*
Expand Down
6 changes: 3 additions & 3 deletions src/FactoryMuffin.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function setDeleteMethod($method)
*
* @return object
*/
public function create($model, $attr = array())
public function create($model, array $attr = array())
{
$obj = $this->instance($model, $attr, true);

Expand Down Expand Up @@ -179,7 +179,7 @@ public function deleteSaved()
*
* @return object
*/
public function instance($model, $attr = array(), $save = false)
public function instance($model, array $attr = array(), $save = false)
{
// Get the factory attributes for that model
$attr_array = $this->attributesFor($model, $attr, $save);
Expand All @@ -203,7 +203,7 @@ public function instance($model, $attr = array(), $save = false)
*
* @return array
*/
public function attributesFor($model, $attr = array(), $save = false)
public function attributesFor($model, array $attr = array(), $save = false)
{
$factory_attrs = $this->getFactoryAttrs($model);

Expand Down

0 comments on commit c27c42c

Please sign in to comment.