Browse Source

Fix method PSR-2 braces in docblock code examples

Bryan Crowe 11 years ago
parent
commit
bf95aa1421

+ 2 - 1
src/Auth/ControllerAuthorize.php

@@ -25,7 +25,8 @@ use Cake\Network\Request;
  * return a boolean to indicate whether or not the user is authorized.
  *
  * ```
- *  public function isAuthorized($user) {
+ *  public function isAuthorized($user)
+ *  {
  *      if ($this->request->param('admin')) {
  *          return $user['role'] === 'admin';
  *      }

+ 2 - 1
src/Event/EventListenerInterface.php

@@ -29,7 +29,8 @@ interface EventListenerInterface
      * ### Example:
      *
      * ```
-     *  public function implementedEvents() {
+     *  public function implementedEvents()
+     *  {
      *      return [
      *          'Order.complete' => 'sendEmail',
      *          'Article.afterBuy' => 'decrementInventory',

+ 2 - 1
src/Event/README.md

@@ -19,7 +19,8 @@ class Orders {
 
 	use EventManagerTrait;
 
-	public function placeOrder($order) {
+	public function placeOrder($order)
+	{
 		$this->doStuff();
 		$event = new Event('Orders.afterPlace', $this, [
 			'order' => $order

+ 4 - 2
src/ORM/Table.php

@@ -273,7 +273,8 @@ class Table implements RepositoryInterface, EventListenerInterface
      * define validation and do any other initialization logic you need.
      *
      * ```
-     *  public function initialize(array $config) {
+     *  public function initialize(array $config)
+     *  {
      *      $this->belongsTo('Users');
      *      $this->belongsToMany('Tagging.Tags');
      *      $this->primaryKey('something_else');
@@ -1100,7 +1101,8 @@ class Table implements RepositoryInterface, EventListenerInterface
      * you will need to create a method in your Table subclass as follows:
      *
      * ```
-     * public function validationForSubscription($validator) {
+     * public function validationForSubscription($validator)
+     * {
      *  return $validator
      *  ->add('email', 'valid-email', ['rule' => 'email'])
      *  ->add('password', 'valid', ['rule' => 'notEmpty'])