From 2ec6cad5b54df5dea1a20489c0759e7a9b53ed94 Mon Sep 17 00:00:00 2001 From: Stephen Tellis Date: Wed, 1 Oct 2014 06:18:30 -0400 Subject: [PATCH 1/3] Added missing '@' for a @return tag for create() method --- README.markdown | 4 ++++ paris.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index f4ff214f..71428cbf 100644 --- a/README.markdown +++ b/README.markdown @@ -74,6 +74,10 @@ foreach ($tweets as $tweet) { Changelog --------- +#### 1.5.5 - released 2014-10-01 + +* Added missing '@' for a @return tag for create() method [[stellis](https://github.com/stellis)] + #### 1.5.4 - released 2014-09-23 * Corrects return value in docblock for 2 Model functions [[michaelward82](https://github.com/michaelward82)] - [issue #99](https://github.com/j4mie/paris/pull/99) diff --git a/paris.php b/paris.php index beffed63..6be39bda 100644 --- a/paris.php +++ b/paris.php @@ -155,7 +155,7 @@ public function find_many() { * empty instance of the class associated with * this wrapper instead of the raw ORM class. * - * return ORMWrapper|bool + * @return ORMWrapper|bool */ public function create($data=null) { return $this->_create_model_instance(parent::create($data)); From c9f00c4573a3f8e3b8f9b754b790007ef98d9e68 Mon Sep 17 00:00:00 2001 From: Stephen Tellis Date: Wed, 1 Oct 2014 06:34:15 -0400 Subject: [PATCH 2/3] Added @method tags for magic methods --- README.markdown | 4 ++++ paris.php | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/README.markdown b/README.markdown index 71428cbf..c7fbacb0 100644 --- a/README.markdown +++ b/README.markdown @@ -74,6 +74,10 @@ foreach ($tweets as $tweet) { Changelog --------- +#### 1.5.6 - released 2014-10-01 + +* Added @method tags for magic methods [[stellis](https://github.com/stellis)] + #### 1.5.5 - released 2014-10-01 * Added missing '@' for a @return tag for create() method [[stellis](https://github.com/stellis)] diff --git a/paris.php b/paris.php index 6be39bda..81eb2caa 100644 --- a/paris.php +++ b/paris.php @@ -48,6 +48,10 @@ * You shouldn't need to interact with this class * directly. It is used internally by the Model base * class. + * @method void setClassName($class_name) + * @method static \ORMWrapper forTable($table_name, $connection_name = parent::DEFAULT_CONNECTION) + * @method \Model findOne($id=null) + * @method Array findMany() */ class ORMWrapper extends ORM { @@ -169,6 +173,11 @@ public function create($data=null) { * class Widget extends Model { * } * + * @method void setOrm($orm) + * @method $this setExpr($property, $value = null) + * @method bool isDirty($property) + * @method bool isNew() + * @method Array asArray() */ class Model { From 8611fb7d485ca41eb4a69e7f34aa3378e8f98309 Mon Sep 17 00:00:00 2001 From: Stephen Tellis Date: Wed, 1 Oct 2014 07:14:25 -0400 Subject: [PATCH 3/3] Added note about the purpose of the magic-method documentation --- paris.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paris.php b/paris.php index 81eb2caa..5b5d76dc 100644 --- a/paris.php +++ b/paris.php @@ -48,6 +48,12 @@ * You shouldn't need to interact with this class * directly. It is used internally by the Model base * class. + * + * + * The methods documented below are magic methods that conform to PSR-1. + * This documentation exposes these methods to doc generators and IDEs. + * @see http://www.php-fig.org/psr/psr-1/ + * * @method void setClassName($class_name) * @method static \ORMWrapper forTable($table_name, $connection_name = parent::DEFAULT_CONNECTION) * @method \Model findOne($id=null) @@ -173,6 +179,11 @@ public function create($data=null) { * class Widget extends Model { * } * + * + * The methods documented below are magic methods that conform to PSR-1. + * This documentation exposes these methods to doc generators and IDEs. + * @see http://www.php-fig.org/psr/psr-1/ + * * @method void setOrm($orm) * @method $this setExpr($property, $value = null) * @method bool isDirty($property)