Skip to content

Commit

Permalink
Merge pull request #371 from thephpleague/docs
Browse files Browse the repository at this point in the history
Documentation Improvements
  • Loading branch information
GrahamCampbell committed Dec 22, 2014
2 parents aae8666 + 3428f56 commit ecb1f5d
Show file tree
Hide file tree
Showing 26 changed files with 71 additions and 65 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2014 Scott Robertson <[email protected]>
Copyright (c) 2014 Graham Campbell <[email protected]>
Copyright (c) 2014 Scott Robertson <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Please check out our [contribution guidelines](CONTRIBUTING.md) for details.

## Credits

Factory Muffin is based on [Zizaco Zizuini](https://github.com/Zizaco)'s original work on "Factory Muff", and is currently maintained by [Scott Robertson](https://github.com/scottrobertson) and [Graham Campbell](https://github.com/GrahamCampbell). Thank you to all our wonderful [contributors](https://github.com/thephpleague/factory-muffin/contributors) too.
Factory Muffin is based on [Zizaco Zizuini](https://github.com/Zizaco)'s original work on "Factory Muff", and is currently maintained by [Graham Campbell](https://github.com/GrahamCampbell) and [Scott Robertson](https://github.com/scottrobertson). Thank you to all our wonderful [contributors](https://github.com/thephpleague/factory-muffin/contributors) too.


## License
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"homepage": "http://factory-muffin.thephpleague.com/",
"license": "MIT",
"authors": [
{
"name": "Scott Robertson",
"email": "[email protected]"
},
{
"name": "Graham Campbell",
"email": "[email protected]"
},
{
"name": "Scott Robertson",
"email": "[email protected]"
}
],
"require": {
Expand Down
20 changes: 10 additions & 10 deletions src/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
*
* This class contains some array helpers we use internally.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class Arr
{
/**
* Get an item from an array.
*
* @param array $array
* @param string $key
* @param array $array The array to get the item from.
* @param string $key The index the item is located at.
*
* @return mixed
*/
Expand All @@ -43,8 +43,8 @@ public static function get(&$array, $key)
/**
* Is the item in the array.
*
* @param array $array
* @param mixed $item
* @param array $array The array to search.
* @param mixed $item The item to search for.
*
* @return bool
*/
Expand All @@ -56,8 +56,8 @@ public static function has(&$array, $item)
/**
* Add an object to an array.
*
* @param array $array
* @param object $object
* @param array $array The array to add to.
* @param object $object The object to add.
*
* @return void
*/
Expand All @@ -69,9 +69,9 @@ public static function add(&$array, $object)
/**
* Move an object to another array.
*
* @param array $old
* @param array $new
* @param object $object
* @param array $old The old array.
* @param array $new The new array.
* @param object $object The object to move.
*
* @return void
*/
Expand Down
30 changes: 15 additions & 15 deletions src/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
/**
* This is the model definition class.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class Definition
Expand Down Expand Up @@ -83,9 +83,9 @@ public function getClass()
/**
* Set the model group.
*
* @param string|null $group
* @param string|null $group The model group.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function setGroup($group)
{
Expand All @@ -107,9 +107,9 @@ public function getGroup()
/**
* Set the maker.
*
* @param callable $maker
* @param callable $maker The maker.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function setMaker(callable $maker)
{
Expand All @@ -121,7 +121,7 @@ public function setMaker(callable $maker)
/**
* Clear the maker.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function clearMaker()
{
Expand All @@ -143,9 +143,9 @@ public function getMaker()
/**
* Set the callback.
*
* @param callable $callback
* @param callable $callback The callback.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function setCallback(callable $callback)
{
Expand All @@ -157,7 +157,7 @@ public function setCallback(callable $callback)
/**
* Clear the callback.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function clearCallback()
{
Expand All @@ -181,10 +181,10 @@ public function getCallback()
*
* Note that we're appending to the original attribute definitions here.
*
* @param string $attribute
* @param string|callable $definition
* @param string $attribute The attribute name.
* @param string|callable $definition The attribute definition.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function addDefinition($attribute, $definition)
{
Expand All @@ -199,9 +199,9 @@ public function addDefinition($attribute, $definition)
* Note that we're appending to the original attribute definitions here
* instead of switching them out for the new ones.
*
* @param array $definitions
* @param array $definitions The attribute definitions.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function setDefinitions(array $definitions = [])
{
Expand All @@ -213,7 +213,7 @@ public function setDefinitions(array $definitions = [])
/**
* Clear the attribute definitions.
*
* @return $this
* @return \League\FactoryMuffin\Definition
*/
public function clearDefinitions()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/DeleteFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* loose comparison. This class extends ModelException, so you may want to try
* to catch that exception instead, if you want to be more general.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class DeleteFailedException extends ModelException
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/DeleteMethodNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* extends MethodNotFoundException and ModelException, so you may want to try
* to catch one of those exceptions instead, if you want to be more general.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class DeleteMethodNotFoundException extends MethodNotFoundException
Expand Down
6 changes: 3 additions & 3 deletions src/Exceptions/DeletingFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
* underlying exception, in the order they were thrown during the whole
* process, by calling getExceptions to return an array of exceptions.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class DeletingFailedException extends Exception
{
/**
* The array of exceptions.
* The array of caught exceptions.
*
* @var \Exception[]
*/
Expand Down Expand Up @@ -77,7 +77,7 @@ private function plural($word, $count)
}

/**
* Get the array of exceptions.
* Get the array of caught exceptions.
*
* @return \Exception[]
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/DirectoryNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* This is thrown if you try to load model definitions from a directory that
* doesn't exit.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class DirectoryNotFoundException extends Exception
Expand Down
6 changes: 3 additions & 3 deletions src/Exceptions/MethodNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
* This exception is never directly thrown, but you may try to catch this
* exception rather than the 2 other exceptions that extend this class.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class MethodNotFoundException extends ModelException
{
/**
* The method.
* The method name.
*
* @var string
*/
Expand All @@ -50,7 +50,7 @@ public function __construct($class, $method, $message)
}

/**
* Get the method.
* Get the method name.
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingDefinitionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* definitions first. This class extends ModelException, so you may want to try
* to catch that exception instead, if you want to be more general.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class MissingDefinitionException extends ModelException
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingModelException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* was not found. This class extends ModelException, so you may want to try to
* catch that exception instead, if you want to be more general.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class MissingModelException extends ModelException
Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions/ModelException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
* This exception is never directly thrown, but you may try to catch this
* exception rather than the many other exceptions that extend this class.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class ModelException extends Exception
{
/**
* The model.
* The model class name.
*
* @var string
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Exceptions/SaveFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
* loose comparison. This class extends ModelException, so you may want to try
* to catch that exception instead, if you want to be more general.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class SaveFailedException extends ModelException
{
/**
* The validation errors.
*
* @var string
* @var string|null
*/
private $validationErrors;

Expand Down Expand Up @@ -86,7 +86,7 @@ private function formatErrors($errors)
/**
* Get the validation errors.
*
* @return string
* @return string|null
*/
public function getValidationErrors()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SaveMethodNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* extends MethodNotFoundException and ModelException, so you may want to try
* to catch one of those exceptions instead, if you want to be more general.
*
* @author Scott Robertson <[email protected]>
* @author Graham Campbell <[email protected]>
* @author Scott Robertson <[email protected]>
* @license <https://github.com/thephpleague/factory-muffin/blob/master/LICENSE> MIT
*/
class SaveMethodNotFoundException extends MethodNotFoundException
Expand Down
Loading

0 comments on commit ecb1f5d

Please sign in to comment.