Skip to content

Commit

Permalink
Merge pull request #21 from W0rma/fix-typos-in-code-examples
Browse files Browse the repository at this point in the history
Fix typos in code examples
  • Loading branch information
Naktibalda authored Nov 2, 2019
2 parents 016a035 + 53d9336 commit 54718d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function ($m) {
* ``` php
* <?php
* Stub::makeEmpty('User', ['save' => function () { return true; }]);
* Stub::makeEmpty('User', ['save' => true));
* Stub::makeEmpty('User', ['save' => true]);
* ```
*
* **To create a mock, pass current testcase name as last argument:**
Expand Down Expand Up @@ -299,7 +299,7 @@ public static function copy($obj, $params = [])
*
* ``` php
* <?php
* Stub::construct(new User, ['autosave' => false), ['name' => 'davert']);
* Stub::construct(new User, ['autosave' => false], ['name' => 'davert']);
* ?>
* ```
*
Expand Down Expand Up @@ -353,7 +353,7 @@ public static function construct($class, $constructorParams = [], $params = [],
* ``` php
* <?php
* Stub::constructEmpty('User', ['autosave' => false]);
* Stub::constructEmpty('User', ['autosave' => false), ['name' => 'davert']);
* Stub::constructEmpty('User', ['autosave' => false], ['name' => 'davert']);
* ```
*
* Accepts either name of class or object of that class
Expand Down Expand Up @@ -667,7 +667,7 @@ protected static function getMethodsToReplace(\ReflectionClass $reflection, $par
*
* ``` php
* <?php
* $user = Stub::make('User', array('getName' => Stub::consecutive('david', 'emma', 'sam', 'amy')));
* $user = Stub::make('User', ['getName' => Stub::consecutive('david', 'emma', 'sam', 'amy')]);
* $user->getName(); //david
* $user->getName(); //emma
* $user->getName(); //sam
Expand Down

0 comments on commit 54718d8

Please sign in to comment.