Skip to content

Commit

Permalink
Tweaked DocBlocks
Browse files Browse the repository at this point in the history
Set property and return to boolean for DocBlocks of the CallbackPostTestModel class.
  • Loading branch information
cdvrooman authored and markstory committed Aug 4, 2012
1 parent de14507 commit bbd0b9d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Event/CakeEvent.php
Expand Up @@ -17,9 +17,9 @@
*/

/**
* Represent the transport class of events across the system, it receives a name, and subject and an optional
* Represents the transport class of events across the system, it receives a name, and subject and an optional
* payload. The name can be any string that uniquely identifies the event across the application, while the subject
* represents the object that the event is applying to.
* represents the object that the event applies to.
*
* @package Cake.Event
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Event/CakeEventListener.php
Expand Up @@ -18,15 +18,15 @@

/**
* Objects implementing this interface should declare the `implementedEvents` function
* to hint the event manager what methods should be called when an event is triggered.
* to notify the event manager what methods should be called when an event is triggered.
*
* @package Cake.Event
*/
interface CakeEventListener {

/**
* Returns a list of events this object is implementing, when the class is registered
* in an event manager, each individual method will be associated to the respective event.
* Returns a list of events this object is implementing. When the class is registered
* in an event manager, each individual method will be associated with the respective event.
*
* ## Example:
*
Expand Down
22 changes: 11 additions & 11 deletions lib/Cake/Event/CakeEventManager.php
Expand Up @@ -19,17 +19,17 @@
App::uses('CakeEventListener', 'Event');

/**
* The event manager is responsible for keeping track of event listeners and pass the correct
* data to them, and fire them in the correct order, when associated events are triggered. You
* can create multiple instances of this objects to manage local events or keep a single instance
* The event manager is responsible for keeping track of event listeners, passing the correct
* data to them, and firing them in the correct order, when associated events are triggered. You
* can create multiple instances of this object to manage local events or keep a single instance
* and pass it around to manage all events in your app.
*
* @package Cake.Event
*/
class CakeEventManager {

/**
* The default priority queue value for new attached listeners
* The default priority queue value for new, attached listeners
*
* @var int
*/
Expand All @@ -50,7 +50,7 @@ class CakeEventManager {
protected $_listeners = array();

/**
* Internal flag to distinguish a common manager from the sigleton
* Internal flag to distinguish a common manager from the singleton
*
* @var boolean
*/
Expand All @@ -62,7 +62,7 @@ class CakeEventManager {
* other managers were created. Usually for creating hook systems or inter-class
* communication
*
* If called with a first params, it will be set as the globally available instance
* If called with the first parameter, it will be set as the globally available instance
*
* @param CakeEventManager $manager
* @return CakeEventManager the global event manager
Expand All @@ -83,15 +83,15 @@ public static function instance($manager = null) {
* Adds a new listener to an event. Listeners
*
* @param callback|CakeEventListener $callable PHP valid callback type or instance of CakeEventListener to be called
* when the event named with $eventKey is triggered. If a CakeEventListener instances is passed, then the `implementedEvents`
* when the event named with $eventKey is triggered. If a CakeEventListener instance is passed, then the `implementedEvents`
* method will be called on the object to register the declared events individually as methods to be managed by this class.
* It is possible to define multiple event handlers per event name.
*
* @param string $eventKey The event unique identifier name to with the callback will be associated. If $callable
* @param string $eventKey The event unique identifier name with which the callback will be associated. If $callable
* is an instance of CakeEventListener this argument will be ignored
*
* @param array $options used to set the `priority` and `passParams` flags to the listener.
* Priorities are handled like queues, and multiple attachments into the same priority queue will be treated in
* Priorities are handled like queues, and multiple attachments added to the same priority queue will be treated in
* the order of insertion. `passParams` means that the event data property will be converted to function arguments
* when the listener is called. If $called is an instance of CakeEventListener, this parameter will be ignored
*
Expand Down Expand Up @@ -145,7 +145,7 @@ protected function _attachSubscriber(CakeEventListener $subscriber) {
* Auxiliary function to extract and return a PHP callback type out of the callable definition
* from the return value of the `implementedEvents` method on a CakeEventListener
*
* @param array $function the array taken from a handler definition for a event
* @param array $function the array taken from a handler definition for an event
* @param CakeEventListener $object The handler object
* @return callback
*/
Expand Down Expand Up @@ -256,7 +256,7 @@ public function dispatch($event) {
}

/**
* Returns a list of all listeners for a eventKey in the order they should be called
* Returns a list of all listeners for an eventKey in the order they should be called
*
* @param string $eventKey
* @return array
Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/Test/Case/Model/models.php
Expand Up @@ -2003,28 +2003,28 @@ class CallbackPostTestModel extends CakeTestModel {
/**
* variable to control return of beforeValidate
*
* @var string
* @var boolean
*/
public $beforeValidateReturn = true;

/**
* variable to control return of beforeSave
*
* @var string
* @var boolean
*/
public $beforeSaveReturn = true;

/**
* variable to control return of beforeDelete
*
* @var string
* @var boolean
*/
public $beforeDeleteReturn = true;

/**
* beforeSave callback
*
* @return void
* @return boolean
*/
public function beforeSave($options = array()) {
return $this->beforeSaveReturn;
Expand All @@ -2033,7 +2033,7 @@ public function beforeSave($options = array()) {
/**
* beforeValidate callback
*
* @return void
* @return boolean
*/
public function beforeValidate($options = array()) {
return $this->beforeValidateReturn;
Expand All @@ -2042,7 +2042,7 @@ public function beforeValidate($options = array()) {
/**
* beforeDelete callback
*
* @return void
* @return boolean
*/
public function beforeDelete($cascade = true) {
return $this->beforeDeleteReturn;
Expand Down

0 comments on commit bbd0b9d

Please sign in to comment.