Documentation fixes #243

Merged
merged 1 commit into from Jun 21, 2013

Projects

None yet

5 participants

@BenMorel
Contributor
BenMorel commented Jan 7, 2013

Carrying on with the work done on the ORM, here are my documentation fixes for the DBAL library:

  • Missing docblocks
  • Missing / incorrect @param / @return / @throws annotations
  • Missing newlines between annotations
  • Incorrect vertical alignment of @param annotations

In addition:

  • Removal of return statements on void methods
  • Cleanup of unused private / local variables
@Ocramius
Member
Ocramius commented Jan 7, 2013

@BenMorel rebasing all those will be hell for people with currently open PRs (and for you too if merging takes some time).

Please consider squashing all those once you got it completed...

@BenMorel
Contributor
BenMorel commented Jan 7, 2013

@Ocramius it is complete!

@Ocramius
Member
Ocramius commented Jan 7, 2013

Please squash then :S

@BenMorel
Contributor
BenMorel commented Jan 7, 2013

Squashed :-)

@BenMorel
Contributor
BenMorel commented Jan 7, 2013

Oops, I just noticed that some files are shown as entirely replaced, instead of just showing the diff.
I have no idea why, as the others diffs appear correctly.

@Ocramius Any idea how to fix this?

@Ocramius
Member
Ocramius commented Jan 7, 2013

@BenMorel that's just GIT trying to outsmart things.

Anyway, I just noticed you kept lgpl everywhere. Can you move to MIT? The entire project migrated some months ago :)

https://github.com/doctrine/dbal/blob/master/composer.json#L7

@BenMorel
Contributor
BenMorel commented Jan 7, 2013

I think I got it: I must have overwritten a file in some way, and GIT has detected a timestamp change, hence considering that the file has been replaced. I think I will be able to fix that.

No problem to include the MIT license, can you point to a sample file where it's included already for reference?

@BenMorel
Contributor
BenMorel commented Jan 7, 2013

Thanks, I will do that.
I managed to fix the file "replace" problem, it actually turned out that something had converted several files to Windows line endings. I converted back all the changed files to Linux line endings, and everything is back to normal.

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/ConnectionException.php
@@ -22,31 +20,40 @@
namespace Doctrine\DBAL;
/**
- * Doctrine\DBAL\ConnectionException
- *
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link www.doctrine-project.org
- * @since 2.0
- * @version $Revision: 4628 $
- * @author Jonathan H. Wage <jonwage@gmail.com
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @version $Revision: 4628 $
@stof
stof Jan 7, 2013 Member

Please remove this $Revision stuff which is a left-over from some SVN times (just like you removed it in the license header)

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php
*
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link www.doctrine-project.com
- * @since 1.0
- * @version $Revision$
- * @author Benjamin Eberlei <kontakt@beberlei.de>
- * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
- * @author Jonathan Wage <jonwage@gmail.com>
- * @author Roman Borschel <roman@code-factory.org>
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
@stof
stof Jan 7, 2013 Member

Please remove this SVN artifact. It is a left-over

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
/**
* Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
*
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link www.doctrine-project.com
- * @since 1.0
- * @version $Revision$
- * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
@stof
stof Jan 7, 2013 Member

here is another one

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
/**
* Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
*
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link www.doctrine-project.com
- * @since 1.0
- * @version $Revision$
- * @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @link www.doctrine-project.com
@stof
stof Jan 7, 2013 Member

If you are motivated (or if you know how to use a search and replace on the whole project 😄), it would be great to fix all the broken links too. The website is www.doctrine-project.org, not www.doctrine-project.com.
As this PR is fixing the phpdoc everywhere, it might be a good place to fix this too.

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
@@ -26,30 +26,33 @@
/**
* MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection
*
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link www.doctrine-project.com
- * @since 1.0
- * @version $Revision$
- * @author Benjamin Eberlei <kontakt@beberlei.de>
- * @deprecated Use "charset" option to PDO MySQL Connection instead.
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
@stof
stof Jan 7, 2013 Member

here is another one

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/LockMode.php
*
- * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
- * @link www.doctrine-project.com
- * @since 1.0
- * @version $Revision$
- * @author Benjamin Eberlei <kontakt@beberlei.de>
- * @author Roman Borschel <roman@code-factory.org>
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
@stof
stof Jan 7, 2013 Member

another here

@stof stof commented on an outdated diff Jan 7, 2013
lib/Doctrine/DBAL/Logging/DebugStack.php
*
- *
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
@stof
stof Jan 7, 2013 Member

and here

@BenMorel
Contributor
BenMorel commented Jan 8, 2013

@Ocramius The license has been updated to MIT. This is already squashed in the previous commit.

@stof The SVN leftovers have been removed, and the links updated.
I've done a separate commit for you to review the changes.
If needed, I can squash it in the previous commit as well!

@guilhermeblanco guilhermeblanco and 1 other commented on an outdated diff Jan 8, 2013
lib/Doctrine/DBAL/Statement.php
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
if ($arg2 === null) {
- return $this->stmt->setFetchMode($fetchMode);
+ $this->stmt->setFetchMode($fetchMode);
@guilhermeblanco
guilhermeblanco Jan 8, 2013 Member

Any reason why you removed the return?
PDOStatement->setFetchMode returns a mixed value. According to docs, it returns 1 in case of success or false on failure.

@BenMorel
BenMorel Jan 8, 2013 Contributor

Ok, then I need to change the interface and all classes implementing it.
The interface did not define a return type, so I assumed void.

And most of the implementing classes where returning void:

@BenMorel
BenMorel Jan 8, 2013 Contributor

Actually, it does not return mixed, it returns bool.
This is an error in the PHP documentation (I will file it there):

$pdo = new PDO('sqlite::memory:');
$st = $pdo->query('SELECT * FROM sqlite_master');
var_export($st->setFetchMode(PDO::FETCH_NUM)); // true, not 1
@BenMorel
BenMorel Jan 12, 2013 Contributor

FYI, the online documentation has been fixed since.

@guilhermeblanco guilhermeblanco and 1 other commented on an outdated diff Jan 8, 2013
lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
@@ -739,7 +739,7 @@ public function getAlterTableSQL(TableDiff $diff)
$sql = array();
$tableSql = array();
if ( ! $this->onSchemaAlterTable($diff, $tableSql)) {
- $newTableName = $diff->newName ?: $diff->name;
+ $diff->newName ?: $diff->name;
@guilhermeblanco
guilhermeblanco Jan 8, 2013 Member

What does this line do? It seems to be irrelevant now

@BenMorel
BenMorel Jan 8, 2013 Contributor

True, I removed the unused variable, but missed the fact that the code behind was just reading a variable and was not doing anything. I'll fix that.

@guilhermeblanco guilhermeblanco and 2 others commented on an outdated diff Jan 8, 2013
lib/Doctrine/DBAL/Schema/Table.php
* @return Table
*/
public function dropColumn($columnName)
{
$columnName = strtolower($columnName);
- $column = $this->getColumn($columnName);
+ $this->getColumn($columnName);
@guilhermeblanco
guilhermeblanco Jan 8, 2013 Member

We should either use the getColumn that does column existance introspection or remove this line.

@BenMorel
BenMorel Jan 8, 2013 Contributor

I removed the variable because it was not used here, but left the call to getColumn() as it throws an exception if the column name does not exist, which I thought was the expected behaviour. I let you decide what to do here.

@Ocramius
Ocramius Jan 11, 2013 Member

@BenMorel can you add a comment that explains this?

@BenMorel
BenMorel Jan 11, 2013 Contributor

@Ocramius The only thing that must be decided on, is what happens if you call dropColumn() with a non-existing column name.

  • If nothing should happen, then we can remove this line;
  • If an exception must be thrown, then leaving this line does the job (although I do agree that it looks weird).
@guilhermeblanco
guilhermeblanco Jan 11, 2013 Member

Remove the line only

@BenMorel
BenMorel Jan 12, 2013 Contributor

I just removed this line. As a consequence, dropColumn() won't complain anymore if the column name does not exist.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 8, 2013
lib/Doctrine/DBAL/Statement.php
} else if ($arg3 === null) {
- return $this->stmt->setFetchMode($fetchMode, $arg2);
@guilhermeblanco
guilhermeblanco Jan 8, 2013 Member

Also the same question applies here

@guilhermeblanco guilhermeblanco and 1 other commented on an outdated diff Jan 8, 2013
lib/Doctrine/DBAL/Statement.php
}
- return $this->stmt->setFetchMode($fetchMode, $arg2, $arg3);
@guilhermeblanco
guilhermeblanco Jan 8, 2013 Member

If you double check the logic of the method, it has changed.
It will always try to apply this line, because others don't return.

@BenMorel
BenMorel Jan 8, 2013 Contributor

True, that would have been a big mistake! If we'd kept the void return type, I should've put a return; statement after each of the first two calls! That's fixed anyway.

@guilhermeblanco
Member

Patch looks great, although some changes I highlighted are still required.
As soon as you fix the pointed elements, I'm fine to merge.

@BenMorel
Contributor
BenMorel commented Jan 8, 2013

@guilhermeblanco Thanks for your comments. I will have a look at them tonight.

@BenMorel
Contributor

@guilhermeblanco Could you please comment on this and this? Thanks!

@guilhermeblanco
Member

I'm fine with the setFetchMode change

@BenMorel
Contributor

Ok, we're good then! Do you want me to squash all the extra commits into the first one?

@Ocramius
Member

@BenMorel that's always useful =)

@BenMorel
Contributor

Squashed!

@BenMorel
Contributor

I'm done with this job, do let me know if you have any comment!

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
@@ -193,6 +220,7 @@ public function execute($params = null)
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
$this->_defaultFetchMode = $fetchMode;
+ return true;
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

Missing line break

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php
@@ -37,7 +37,12 @@ class SQLSrvConnection implements \Doctrine\DBAL\Driver\Connection
*/
protected $lastInsertId;
-
+ /**
+ * @param string $serverName
+ * @param array $connectionOptions
+ *
+ * @throws SQLSrvException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
*
* @param int
*/
private $defaultFetchMode = PDO::FETCH_BOTH;
/**
- * @var int|null
+ * The last insert ID.
+ *
+ * @var LastInsertId|null
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

LastInsertId is an object, so we use FQCN.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
$this->defaultFetchMode = $fetchMode;
+ return true;
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

Missing line break

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DriverManager.php
@@ -101,10 +105,13 @@ private function __construct() { }
* <b>driverClass</b>:
* The driver class to use.
*
- * @param array $params The parameters.
- * @param \Doctrine\DBAL\Configuration The configuration to use.
- * @param \Doctrine\Common\EventManager The event manager to use.
+ * @param array $params The parameters.
+ * @param Configuration|null $config The configuration to use.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DriverManager.php
@@ -101,10 +105,13 @@ private function __construct() { }
* <b>driverClass</b>:
* The driver class to use.
*
- * @param array $params The parameters.
- * @param \Doctrine\DBAL\Configuration The configuration to use.
- * @param \Doctrine\Common\EventManager The event manager to use.
+ * @param array $params The parameters.
+ * @param Configuration|null $config The configuration to use.
+ * @param EventManager|null $eventManager The event manager to use.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DriverManager.php
* @return \Doctrine\DBAL\Connection
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DriverManager.php
@@ -151,7 +158,11 @@ public static function getConnection(
/**
* Checks the list of parameters.
*
- * @param array $params
+ * @param array $params The list of parameters.
+ *
+ * @return void
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Logging/LoggerChain.php
*/
class LoggerChain implements SQLLogger
{
+ /**
+ * @var SQLLogger[]
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -483,6 +491,8 @@ public function getWildcards()
* Returns the regular expression operator.
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @return string to get global unique identifier
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @param string $date1
* @param string $date2
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* @param integer $days
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* @param integer $days
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* @param integer $months
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* @param integer $months
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* @param integer $createFlags
*
* @return array The sequence of SQL statements.
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @param \Doctrine\DBAL\Schema\Sequence $sequence
*
* @return string
*
- * @throws DBALException
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @param \Doctrine\DBAL\Schema\Sequence $sequence
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param \Doctrine\DBAL\Schema\Constraint $constraint
+ * @param Constraint $constraint
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param Index $index
- * @param string|Table $table name of the table on which the index is to be created
+ * @param Index $index
+ * @param string|Table $table The name of the table on which the index is to be created.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/CacheException.php
@@ -25,11 +25,17 @@
*/
class CacheException extends \Doctrine\DBAL\DBALException
{
+ /**
+ * @return CacheException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/CacheException.php
static public function noCacheKey()
{
return new self("No cache key was set.");
}
+ /**
+ * @return CacheException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
@@ -31,22 +31,24 @@
class QueryCacheProfile
{
/**
- * @var Cache
+ * @var Cache|null
@guilhermeblanco guilhermeblanco and 1 other commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
*/
private $cacheKey;
/**
- * @param int $lifetime
- * @param string $cacheKey
- * @param Cache $resultCache
+ * @param int $lifetime
+ * @param string|null $cacheKey
+ * @param Cache|null $resultCache
@BenMorel
BenMorel Jan 28, 2013 Contributor

@guilhermeblanco There are places like this one, where I chose to favour readability, over this alternative:

@param int                               $lifetime
@param string|null                       $cacheKey
@param \Doctrine\Common\Cache\Cache|null $resultCache

But if that's ok with you, that's ok with me.
However, it's important to note that I only use the short class name when it's imported with a use statement.

If you do want the FQCN unconditionally, do let me know, and I'll update all files.

@guilhermeblanco
guilhermeblanco Jan 29, 2013 Member

Some IDEs can only resolve if you use FQCN, that's why we advocate to use them.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
@@ -56,7 +58,7 @@ public function __construct($lifetime = 0, $cacheKey = null, Cache $resultCache
}
/**
- * @return Cache
+ * @return Cache|null
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
@@ -73,6 +75,8 @@ public function getLifetime()
/**
* @return string
+ *
+ * @throws CacheException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/ArrayStatement.php
private $columnCount = 0;
+
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/ArrayStatement.php
private $num = 0;
+
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
*/
private $cacheKey;
/**
- * @param int $lifetime
- * @param string $cacheKey
- * @param Cache $resultCache
+ * @param int $lifetime
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
@@ -121,7 +128,8 @@ public function setCacheKey($cacheKey)
}
/**
- * @param int $lifetime
+ * @param int $lifetime
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
$this->defaultFetchMode = $fetchMode;
+ return true;
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

Missing line break

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Configuration.php
@@ -45,7 +45,9 @@ class Configuration
/**
* Sets the SQL logger to use. Defaults to NULL which means SQL logging is disabled.
*
- * @param SQLLogger $logger
+ * @param SQLLogger|null $logger
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
@@ -173,15 +174,20 @@ class Connection implements DriverConnection
*/
private $_isRollbackOnly = false;
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
private $_defaultFetchMode = PDO::FETCH_ASSOC;
/**
* Initializes a new instance of the Connection class.
*
- * @param array $params The connection parameters.
- * @param Driver $driver
- * @param Configuration $config
- * @param EventManager $eventManager
+ * @param array $params The connection parameters.
+ * @param Driver $driver The driver to use.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN along this and next lines

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
private $_defaultFetchMode = PDO::FETCH_ASSOC;
/**
* Initializes a new instance of the Connection class.
*
- * @param array $params The connection parameters.
- * @param Driver $driver
- * @param Configuration $config
- * @param EventManager $eventManager
+ * @param array $params The connection parameters.
+ * @param Driver $driver The driver to use.
+ * @param Configuration|null $config The configuration, optional.
+ * @param EventManager|null $eventManager The event manager, optional.
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
@@ -398,9 +408,10 @@ public function fetchArray($statement, array $params = array())
* Prepares and executes an SQL query and returns the value of a single column
* of the first row of the result.
*
- * @param string $statement sql query to be executed
- * @param array $params prepared statement params
- * @param int $colnum 0-indexed column number to retrieve
+ * @param string $statement The SQL query to be executed.
+ * @param array $params The prepared statement params.
+ * @param int $colnum The 0-indexed column number to retrieve.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return \Doctrine\DBAL\Driver\Statement The prepared statement.
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return integer The number of affected rows.
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return integer The number of affected rows.
+ *
+ * @throws DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
@@ -887,6 +924,10 @@ public function lastInsertId($seqName = null)
* the transaction is rolled back and the exception re-thrown.
*
* @param Closure $func The function to execute transactionally.
+ *
+ * @return void
+ *
+ * @throws Exception
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return void
+ *
+ * @throws ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return void
+ *
+ * @throws ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return void
+ *
+ * @throws ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
* @return void
+ *
+ * @throws ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connection.php
@@ -1191,9 +1247,12 @@ public function convertToPHPValue($value, $type)
* Binds a set of parameters, some or all of which are typed with a PDO binding type
* or DBAL mapping type, to a given statement.
*
- * @param string $stmt The statement to bind the values to.
- * @param array $params The map/list of named/positional parameters.
- * @param array $types The parameter types (PDO binding types or DBAL mapping types).
+ * @param Driver\Statement $stmt The statement to bind the values to.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/ConnectionException.php
*/
class ConnectionException extends DBALException
{
+ /**
+ * @return ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/ConnectionException.php
public static function commitFailedRollbackOnly()
{
return new self("Transaction commit failed because the transaction has been marked for rollback only.");
}
+ /**
+ * @return ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/ConnectionException.php
public static function noActiveTransaction()
{
return new self("There is no active transaction.");
}
+ /**
+ * @return ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/ConnectionException.php
public static function savepointsNotSupported()
{
return new self("Savepoints are not supported by this driver.");
}
+ /**
+ * @return ConnectionException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
@@ -99,12 +98,14 @@ class MasterSlaveConnection extends Connection
protected $keepSlave = false;
/**
- * Create Master Slave Connection
+ * Creates Master Slave Connection.
+ *
+ * @param array $params
+ * @param Driver $driver
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and along these lines

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
namespace Doctrine\DBAL;
class DBALException extends \Exception
{
+ /**
+ * @param string $method
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
public static function notSupported($method)
{
return new self("Operation '$method' is not supported by platform.");
}
+ /**
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -16,6 +41,9 @@ public static function invalidPlatformSpecified()
"\Doctrine\DBAL\Platforms\AbstractPlatform.");
}
+ /**
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -24,18 +52,34 @@ public static function invalidPdoInstance()
);
}
+ /**
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
public static function driverRequired()
{
return new self("The options 'driver' or 'driverClass' are mandatory if no PDO ".
"instance is given to DriverManager::getConnection().");
}
+ /**
+ * @param string $unknownDriverName
+ * @param array $knownDrivers
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
public static function unknownDriver($unknownDriverName, array $knownDrivers)
{
return new self("The given 'driver' ".$unknownDriverName." is unknown, ".
"Doctrine currently supports only the following drivers: ".implode(", ", $knownDrivers));
}
+ /**
+ * @param \Exception $driverEx
+ * @param string $sql
+ * @param array $params
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -47,12 +91,22 @@ public static function driverExceptionDuringQuery(\Exception $driverEx, $sql, ar
return new self($msg, 0, $driverEx);
}
+ /**
+ * @param string $wrapperClass
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
public static function invalidWrapperClass($wrapperClass)
{
return new self("The given 'wrapperClass' ".$wrapperClass." has to be a ".
"subtype of \Doctrine\DBAL\Connection.");
}
+ /**
+ * @param string $driverClass
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -61,6 +115,7 @@ public static function invalidDriverClass($driverClass)
/**
* @param string $tableName
+ *
* @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -70,6 +125,7 @@ public static function invalidTableName($tableName)
/**
* @param string $tableName
+ *
* @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -77,16 +133,29 @@ public static function noColumnsSpecifiedForTable($tableName)
return new self("No columns specified for table ".$tableName);
}
+ /**
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
public static function limitOffsetInvalid()
{
return new self("Invalid Offset in Limit Query, it has to be larger or equal to 0.");
}
+ /**
+ * @param string $name
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
public static function typeExists($name)
{
return new self('Type '.$name.' already exists.');
}
+ /**
+ * @param string $name
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/DBALException.php
@@ -99,6 +168,11 @@ public static function unknownColumnType($name)
);
}
+ /**
+ * @param string $name
+ *
+ * @return DBALException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Connection.php
function query();
+
+ /**
+ * Quotes a string for use in a query.
+ *
+ * @param string $input
+ * @param int $type
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Connection.php
function quote($input, $type=\PDO::PARAM_STR);
+
+ /**
+ * Execute an SQL statement and return the number of affected rows.
+ *
+ * @param string $statement
+ *
+ * @return int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Connection.php
function lastInsertId($name = null);
+
+ /**
+ * Initiates a transaction.
+ *
+ * @return bool TRUE on success or FALSE on failure.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Connection.php
function beginTransaction();
+
+ /**
+ * Commits a transaction.
+ *
+ * @return bool TRUE on success or FALSE on failure.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Connection.php
function commit();
+
+ /**
+ * Rolls back the current transaction, as initiated by beginTransaction().
+ *
+ * @return bool TRUE on success or FALSE on failure.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
private $_bindParam = array();
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
@@ -151,6 +162,7 @@ public function execute($params = null)
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
$this->_defaultFetchMode = $fetchMode;
+ return true;
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

Missing line break

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
@@ -31,6 +31,14 @@ class MysqliConnection implements Connection
*/
private $_conn;
+ /**
+ * @param array $params
+ * @param string $username
+ * @param string $password
+ * @param array $driverOptions
+ *
+ * @throws MysqliException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
protected $_stmt;
/**
- * @var null|false|array
+ * @var null|bool|array
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
*
* @var array
*/
protected $_values = array();
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
protected $_defaultFetchMode = PDO::FETCH_BOTH;
+ /**
+ * @param \mysqli $conn
+ * @param string $prepareString
+ *
+ * @throws MysqliException
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
@@ -329,6 +349,7 @@ public function columnCount()
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
$this->_defaultFetchMode = $fetchMode;
+ return true;
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

Missing line break

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
*
- * @param string $username
- * @param string $password
- * @param string $db
+ * @param string $username
+ * @param string $password
+ * @param string $db
+ * @param string|null $charset
+ * @param int $sessionMode
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
*
- * @param string $username
- * @param string $password
- * @param string $db
+ * @param string $username
+ * @param string $password
+ * @param string $db
+ * @param string|null $charset
+ * @param int $sessionMode
+ * @param bool $persistent
+ *
+ * @throws OCI8Exception
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
@@ -136,7 +131,9 @@ public function lastInsertId($name = null)
}
/**
- * Return the current execution mode.
+ * Returns the current execution mode.
+ *
+ * @return int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php
namespace Doctrine\DBAL\Driver\OCI8;
class OCI8Exception extends \Exception
{
+ /**
+ * @param array $error
+ *
+ * @return OCI8Exception
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
protected $_sth;
+
+ /**
+ * @var OCI8Connection
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
@@ -43,14 +61,23 @@ class OCI8Statement implements \IteratorAggregate, Statement
PDO::PARAM_LOB => OCI_B_BLOB,
PDO::FETCH_COLUMN => OCI_NUM,
);
+
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
protected $_paramMap = array();
/**
* Creates a new OCI8Statement that uses the given connection handle and SQL statement.
*
- * @param resource $dbh The connection handle.
- * @param string $statement The SQL statement.
+ * @param resource $dbh The connection handle.
+ * @param string $statement The SQL statement.
+ * @param OCI8Connection $conn
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/ResultStatement.php
*
* @param integer $fetchMode
+ * @param mixed $arg2
+ * @param mixed $arg3
+ *
+ * @return bool
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/ResultStatement.php
* @see Query::HYDRATE_* constants
- * @param integer $fetchMode Controls how the next row will be returned to the caller.
- * This value must be one of the Query::HYDRATE_* constants,
- * defaulting to Query::HYDRATE_BOTH
+ *
+ * @param int|null $fetchMode Controls how the next row will be returned to the caller.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/ResultStatement.php
*
- * @param integer $fetchMode Controls how the next row will be returned to the caller.
- * This value must be one of the Query::HYDRATE_* constants,
- * defaulting to Query::HYDRATE_BOTH
+ * @param int|null $fetchMode Controls how the next row will be returned to the caller.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php
*
* @since 2.3
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
class LastInsertId
{
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php
private $id;
+ /**
+ * @param int $id
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/LastInsertId.php
public function setId($id)
{
$this->id = $id;
}
+ /**
+ * @return int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php
@@ -89,6 +91,11 @@ class SQLSrvStatement implements IteratorAggregate, Statement
*/
const LAST_INSERT_ID_SQL = ';SELECT SCOPE_IDENTITY() AS LastInsertId;';
+ /**
+ * @param resource $conn
+ * @param string $sql
+ * @param int|null $lastInsertId
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
* @var string
*/
private $_charset;
/**
- * @var string
+ * The collation, or FALSE if no collation.
+ *
+ * @var string|bool
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
*
- * @param string $charset
- * @param string $collation
+ * @param string $charset The charset.
+ * @param string|bool $collation The collation, or FALSE if no collation.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Logging/DebugStack.php
public $start = null;
+ /**
+ * @var int
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

We advocate "no abbreviations" in our codebase.
This means int must be integer, bool must be boolean, etc.

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param Table|string $table
+ * @param Table|string $table
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param Index|string $name
+ * @param Index|string $index
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param \Doctrine\DBAL\Schema\Constraint $constraint
- * @param string|Table $table
+ * @param \Doctrine\DBAL\Schema\Constraint $constraint
+ * @param string|Table $table
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1118,8 +1170,10 @@ public function getDropConstraintSQL($constraint, $table)
}
/**
- * @param ForeignKeyConstraint|string $foreignKey
- * @param Table|string $table
+ * Returns the SQL to drop a foreign key.
+ *
+ * @param ForeignKeyConstraint|string $foreignKey
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1118,8 +1170,10 @@ public function getDropConstraintSQL($constraint, $table)
}
/**
- * @param ForeignKeyConstraint|string $foreignKey
- * @param Table|string $table
+ * Returns the SQL to drop a foreign key.
+ *
+ * @param ForeignKeyConstraint|string $foreignKey
+ * @param Table|string $table
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* on this platform.
*
- * @param string $table The name of the table.
+ * @param Table $table
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param Index $index
- * @param string|Table $table name of the table on which the index is to be created
+ * @param Index $index
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param Index $index
+ * @param Index $index
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and next line

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * @param ForeignKeyConstraint $foreignKey ForeignKey instance
- * @param string|Table $table name of the table on which the foreign key is to be created
+ * @param ForeignKeyConstraint $foreignKey The foreign key constraint.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and next line

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @param TableDiff $diff
*
* @return array
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
- * The method returns an array of sql statements, since some platforms need several statements.
+ * This method returns an array of SQL statements, since some platforms need several statements.
*
* @param TableDiff $diff
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1508,9 +1583,9 @@ public function getAlterTableSQL(TableDiff $diff)
}
/**
- * @param Column $column
+ * @param Column $column
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and next line

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1533,9 +1608,9 @@ protected function onSchemaAlterTableAddColumn(Column $column, TableDiff $diff,
}
/**
- * @param Column $column
+ * @param Column $column
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and next line

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1559,8 +1634,8 @@ protected function onSchemaAlterTableRemoveColumn(Column $column, TableDiff $dif
/**
* @param ColumnDiff $columnDiff
- * @param TableDiff $diff
- * @param array $columnSql
+ * @param TableDiff $diff
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and next line

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -1583,10 +1658,10 @@ protected function onSchemaAlterTableChangeColumn(ColumnDiff $columnDiff, TableD
}
/**
- * @param string $oldColumnName
- * @param Column $column
+ * @param string $oldColumnName
+ * @param Column $column
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here and next line

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* constraint declaration to be used in statements like CREATE TABLE.
*
- * @param string $name name of the unique constraint
- * @param Index $index index definition
+ * @param string $name The name of the unique constraint.
+ * @param Index $index The index definition.
*
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* declaration to be used in statements like CREATE TABLE.
*
- * @param string $name name of the index
- * @param Index $index index definition
+ * @param string $name The name of the index.
+ * @param Index $index The index definition.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
* as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
*
- * @param ForeignKeyConstraint $foreignKey foreign key definition
+ * @param ForeignKeyConstraint $foreignKey The foreign key definition.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -2063,12 +2150,14 @@ public function getForeignKeyReferentialActionSQL($action)
}
/**
- * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
+ * Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
* of a field declaration to be used in statements like CREATE TABLE.
*
* @param ForeignKeyConstraint $foreignKey
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -2235,42 +2326,81 @@ protected function _getTransactionIsolationLevelSQL($level)
}
}
+ /**
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getListDatabasesSQL()
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @param string $database
+ *
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getListSequencesSQL($database)
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @param string $table
+ *
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getListTableConstraintsSQL($table)
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @param string $table
+ * @param string|null $database
+ *
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getListTableColumnsSQL($table, $database = null)
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco
guilhermeblanco Jan 27, 2013 Member

FQCN here... I recommend search/replace this file... =)

@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getListTablesSQL()
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*
* @param string $database
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -2291,50 +2421,85 @@ public function getListViewsSQL($database)
* @param string $currentDatabase
*
* @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
*/
public function getListTableIndexesSQL($table, $currentDatabase = null)
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @param string $table
+ *
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@guilhermeblanco guilhermeblanco commented on an outdated diff Jan 27, 2013
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getListTableForeignKeysSQL($table)
{
throw DBALException::notSupported(__METHOD__);
}
+ /**
+ * @param string $name
+ * @param string $sql
+ *
+ * @return string
+ *
+ * @throws DBALException If not supported on this platform.
@BenMorel
Contributor

@guilhermeblanco

  • I replaced short class names with their FQCN
  • I replaced the primitive type abbreviations with their full name
  • I added the missing line breaks before the return statements

GitHub keeps displaying some of the comments above for some reason, but they have been updated as you can see by clicking on view full changes.

@BenMorel
Contributor
BenMorel commented Feb 9, 2013

Any other comments on this PR?
It would be nice to merge before it gets too much out of sync with master!

@BenMorel BenMorel referenced this pull request in doctrine/common Apr 5, 2013
Merged

Documentation fixes #245

@BenMorel
Contributor

Any update on this PR? I can rebase it on the current master if everything is OK.

@beberlei
Member

rebase pls

@BenMorel
Contributor

@beberlei Rebased!

@beberlei
Member

@BenMorel still not mergable from the UI :(

@BenMorel BenMorel Fixed documentation.
- Fixed docblocks
- Removed return statements on void methods
- Cleaned up unused private / local variables
- Fixed license issues
- Removed SVN leftovers
- Fixed doctrine-project.org links
- Added line breaks before return statements
f0eaaf6
@BenMorel
Contributor

@beberlei Looks like there's been a new commit in the meantime. Rebased again!

@beberlei beberlei merged commit 270cd8b into doctrine:master Jun 21, 2013

1 check passed

default The Travis CI build passed
Details
@doctrinebot doctrinebot referenced this pull request in doctrine/common Dec 6, 2015
Closed

DCOM-163: [GH-245] Documentation fixes #464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment