Skip to content

PHPDoc blocks improvments + 1 CS Fix #125

Merged
merged 4 commits into from Apr 3, 2012

3 participants

@adrienbrault

Hey guys,

I started to fix a class type inside Connection and then i went ahead to see what i could also improve!

Adrien

@stof stof commented on an outdated diff Apr 2, 2012
lib/Doctrine/DBAL/Connection.php
@@ -419,9 +419,9 @@ public function isTransactionActive()
/**
* Executes an SQL DELETE statement on a table.
*
- * @param string $table The name of the table on which to delete.
- * @param array $identifier The deletion criteria. An associateve array containing column-value pairs.
- * @return integer The number of affected rows.
+ * @param string $tableName The name of the table on which to delete.
+ * @param array $identifier The deletion criteria. An associative array containing column-value pairs.
+ * @return int The number of affected rows.
@stof
Doctrine member
stof added a note Apr 2, 2012

you should keep integer which is used everywhere IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stof stof commented on an outdated diff Apr 2, 2012
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -633,9 +636,9 @@ public function getLowerExpression($str)
/**
* returns the position of the first occurrence of substring $substr in string $str
*
- * @param string $substr literal string to find
- * @param string $str literal string
- * @param int $pos position to start at, beginning of string by default
+ * @param string $str literal string
+ * @param string $substr literal string to find
+ * @param boolean $startPos position to start at, beginning of string by default
@stof
Doctrine member
stof added a note Apr 2, 2012

this is wrong. $startPos is either an integer or false when not used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stof stof commented on an outdated diff Apr 2, 2012
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1918,7 +1929,7 @@ public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey
*
* @throws Doctrine_Exception_Exception if unknown referential action given
@stof
Doctrine member
stof added a note Apr 2, 2012

the exception name is wrong too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
adrienbrault added some commits Apr 2, 2012
@adrienbrault adrienbrault #125 PHPDoc Fixes: "int" => "integer" 6b18f10
@adrienbrault adrienbrault #125 PHPDoc fixes: revert param type to integer 3329548
@adrienbrault adrienbrault #125 PHPDoc: fix @throws type cf04a3c
@adrienbrault

Thanks for the fast feedback. Referenced the PR from my commits, not sure if this is a good idea though.

@jwage
Doctrine member
jwage commented Apr 3, 2012

👍

@jwage jwage merged commit 394f7e9 into doctrine:master Apr 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.