Fixed some phpdoc #180

Merged
merged 2 commits into from Aug 14, 2012

Conversation

Projects
None yet
4 participants
@stof
Member

stof commented Aug 6, 2012

This fixes some phpdoc in the AbstractPlatform and in some child classes. I haven't checked all child classes to ensure that all phpdoc is right now, but the abstract one is now accurate (but a bunch of method are missing their phpdoc altogether)

@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Aug 6, 2012

This pull request passes (merged 2d995f33 into 4319165).

This pull request passes (merged 2d995f33 into 4319165).

@guilhermeblanco

View changes

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -204,6 +204,7 @@ private function initializeAllDoctrineTypeMappings()
* Gets the SQL snippet used to declare a VARCHAR column type.
*
* @param array $field
+ * @return string

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing line break before param and return

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing line break before param and return

This comment has been minimized.

Show comment Hide comment
@stof

stof Aug 6, 2012

Member

The other code in the platforms does not separate them. This is the only reason why I omitted the empty line

@stof

stof Aug 6, 2012

Member

The other code in the platforms does not separate them. This is the only reason why I omitted the empty line

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

DBAL code was not closely revised by me during its creation.
This is not an excuse to not implement the standardized code when implementing new one. I don't mean to sound harsh, but whenever you see some code that's not part of our standard, feel free to update and send a PR. We have tons of them

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

DBAL code was not closely revised by me during its creation.
This is not an excuse to not implement the standardized code when implementing new one. I don't mean to sound harsh, but whenever you see some code that's not part of our standard, feel free to update and send a PR. We have tons of them

@guilhermeblanco

View changes

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -234,6 +235,12 @@ public function getGuidTypeDeclartionSQL(array $field)
return $this->getVarcharTypeDeclarationSQL($field);
}
+ /**
+ * @param int $length

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing documentation.
Missing line break between param and return
Missing line break between return and throws

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing documentation.
Missing line break between param and return
Missing line break between return and throws

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Prefer the non-abbreviated version of integer instead of int.

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Prefer the non-abbreviated version of integer instead of int.

@guilhermeblanco

View changes

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -265,6 +272,7 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
*
* @param string $dbType
* @param string $doctrineType
+ * @throws \Doctrine\DBAL\DBALException if the type is not found

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing line break

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing line break

@guilhermeblanco

View changes

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -669,7 +677,7 @@ public function getLowerExpression($str)
* @param string $str literal string
* @param string $substr literal string to find
* @param integer $startPos position to start at, beginning of string by default
- * @return integer
+ * @return string

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing line break

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Missing line break

@guilhermeblanco

View changes

lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
@@ -700,9 +708,9 @@ public function getNowExpression()
*/
public function getSubstringExpression($value, $from, $len = null)
{
- if ($len === null)

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Turn this method into a ternary return.

return ($len === null)
    ? sprintf('SUBSTRING(%s FROM %s)', $value, $from)
    : sprintf('SUBSTRING(%s FROM %s FOR %s)', $value, $from, $len);

Unfortunately, we cannot break BC and turn $len into $length variable.

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Turn this method into a ternary return.

return ($len === null)
    ? sprintf('SUBSTRING(%s FROM %s)', $value, $from)
    : sprintf('SUBSTRING(%s FROM %s FOR %s)', $value, $from, $len);

Unfortunately, we cannot break BC and turn $len into $length variable.

This comment has been minimized.

Show comment Hide comment
@stof

stof Aug 6, 2012

Member

this is not a BC break. PHP does not support named arguments so we can renamed them :)

@stof

stof Aug 6, 2012

Member

this is not a BC break. PHP does not support named arguments so we can renamed them :)

This comment has been minimized.

Show comment Hide comment
@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Then feel free to modify it

@guilhermeblanco

guilhermeblanco Aug 6, 2012

Member

Then feel free to modify it

@travisbot

This comment has been minimized.

Show comment Hide comment
@travisbot

travisbot Aug 7, 2012

This pull request passes (merged da06cdb into 807e229).

This pull request passes (merged da06cdb into 807e229).

asm89 added a commit that referenced this pull request Aug 14, 2012

@asm89 asm89 merged commit 8f783fb into doctrine:master Aug 14, 2012

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