From e963b0a395e7aa38e82ed2f9a6b3235e7804681e Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Thu, 28 Aug 2014 10:04:56 +0100 Subject: [PATCH] Fixed a few typos --- README.md | 4 ++-- UPGRADING.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 12f5cd0..e2766e3 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ We have provided a nifty way for you to do this in your tests. PHPUnit provides ### Creation/Instantiation Callbacks -You may optionally specify a callback to be executed on model creation/instantiation as a third parameter when defining a definition. We will pass your model instance as the first parameter to the closure if you specify one. We additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function has been used), and `false` if it's not being persisted (the instance function was used). We're using the `isPendingOrSaved` function under the hood here. Note that if you specify a callback and use the create function, we will try to save your model to the database both before and after we execute the callback. +You may optionally specify a callback to be executed on model creation/instantiation as a third parameter when defining a definition. We will pass your model instance as the first parameter to the closure if you specify one. We additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function was used), and `false` if it's not being persisted (the instance function was used). We're using the `isPendingOrSaved` function under the hood here. Note that if you specify a callback and use the create function, we will try to save your model to the database both before and after we execute the callback. ### Generators @@ -158,7 +158,7 @@ League\FactoryMuffin\Facade::define('OtherModel', array( #### Closure -The closure generator can be used if you want a more custom solution. Whatever you return from the closure you write will be set as the attribute. Note that we pass an instance of your model as the first parameter of the closure to give you even more flexibility to modify it as you wish. We additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function has been used), and `false` if it's not being persisted (the instance function was used). We're using the `isPendingOrSaved` function under the hood here. +The closure generator can be used if you want a more custom solution. Whatever you return from the closure you write will be set as the attribute. Note that we pass an instance of your model as the first parameter of the closure to give you even more flexibility to modify it as you wish. We additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function was used), and `false` if it's not being persisted (the instance function was used). We're using the `isPendingOrSaved` function under the hood here. ##### Example 1 diff --git a/UPGRADING.md b/UPGRADING.md index a0927c9..f90ef6a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -26,11 +26,11 @@ We'll now keep track of objects waiting to be saved separately from objects that ### Creation/Instantiation Callbacks -When you define your definitions, you may optionally specify a callback to be executed on model creation/instantiation as a third parameter. We will pass your model instance as the first parameter to the closure if you specify one. We additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function has been used), and `false` if it's not being persisted (the instance function was used). Note that if you specify a callback and use the create function, we will try to save your model to the database both before and after we execute the callback. +When you define your definitions, you may optionally specify a callback to be executed on model creation/instantiation as a third parameter. We will pass your model instance as the first parameter to the closure if you specify one. We additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function was used), and `false` if it's not being persisted (the instance function was used). Note that if you specify a callback and use the create function, we will try to save your model to the database both before and after we execute the callback. ### Addition To The Closure Generator -Now, we additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function has been used), and `false` if it's not being persisted (the instance function was used). This is, of course, in addition to passing the object instance as the first parameter. Previously, you'd have had to call the `isSaved` function on the facade, but this is no longer needed now for checking if the object is being persisted. Note that due to changes to the `isSaved` function, we're actually calling `isPendingOrSaved` under the hood now. +Now, we additionally pass a boolean as the second parameter that will be `true` if the model is being persisted to the database (the create function was used), and `false` if it's not being persisted (the instance function was used). This is, of course, in addition to passing the object instance as the first parameter. Previously, you'd have had to call the `isSaved` function on the facade, but this is no longer needed now for checking if the object is being persisted. Note that due to changes to the `isSaved` function, we're actually calling `isPendingOrSaved` under the hood now. ### Additional Customisation