Skip to content
Permalink
Browse files

Fixing code review problems

  • Loading branch information...
lorenzo committed Oct 28, 2013
1 parent 49049d4 commit 19c3d3806f115263734450b5f0ac805616b4c34e
Showing with 10 additions and 11 deletions.
  1. +3 −3 Cake/Database/Connection.php
  2. +5 −6 Cake/ORM/Entity.php
  3. +1 −1 Cake/ORM/Table.php
  4. +1 −1 Cake/Test/TestCase/ORM/TableTest.php
@@ -442,10 +442,10 @@ public function rollbackSavepoint($name) {
* Executes a callable function inside a transaction, if any exception occurs
* while executing the passed callable, the transaction will be rolled back
* If the result of the callable function is ``false``, the transaction will
* also be rolled back. Otherwise the transaction is committed at after
* executing the callback
* also be rolled back. Otherwise the transaction is committed after executing
* the callback
*
* The callback will receive as first argument this connection instance.
* The callback will receive the connection instance as its first argument..
*
* ### Example:
*
@@ -40,8 +40,8 @@ class Entity implements \ArrayAccess, \JsonSerializable {
protected $_className;
/**
* Holds a list of the properties that where modified after that where added or
* modified after this object was originally created.
* Holds a list of the properties that were modified or added after this object
* was originally created.
*
* @var array
*/
@@ -55,9 +55,8 @@ class Entity implements \ArrayAccess, \JsonSerializable {
protected static $_accessors = [];
/**
* Indicates whether this entity was already persisted in database,
* a null value indicates that it is unknown if it was persisted
* already
* Indicates whether or not this entity has already been persisted.
* A null value indicates an unknown persistence status
*
* @var boolean
*/
@@ -400,7 +399,7 @@ public function clean() {
}
/**
* Returns whether this entity instance was already persisted in the database,
* Returns whether or not this entity has already been persisted.
* This method can return null in the case there is no prior information on
* the status of this entity.
*
@@ -710,7 +710,7 @@ public function exists(array $conditions) {
* - fieldList: An array of field names that should be saved, if empty all
* properties in the passed entity will be saved
* - atomic: Whether to execute the save and callbacks inside a database
* transaction (defualt: true)
* transaction (default: true)
*
* When saving, this method will trigger two events:
*
@@ -1028,7 +1028,7 @@ public function testBeforeSaveModifyData() {
'updated' => new \DateTime('2013-10-10 00:00')
]);
$listener = function($e, $entity, $options) use ($data) {
$this->assertSAme($data, $entity);
$this->assertSame($data, $entity);
$entity->set('password', 'foo');
};
$table->getEventManager()->attach($listener, 'Model.beforeSave');

0 comments on commit 19c3d38

Please sign in to comment.
You can’t perform that action at this time.