Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fixed some phpdoc #180

Merged
merged 2 commits into from almost 2 years ago

4 participants

Christophe Coevoet Don't Add Me To Your Organization a.k.a The Travis Bot Guilherme Blanco Alexander
Christophe Coevoet
stof commented

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)

Don't Add Me To Your Organization a.k.a The Travis Bot

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

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

Missing line break before param and return

Christophe Coevoet
stof added a note

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

Guilherme Blanco Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
... ... @@ -234,6 +235,12 @@ public function getGuidTypeDeclartionSQL(array $field)
234 235 return $this->getVarcharTypeDeclarationSQL($field);
235 236 }
236 237
  238 + /**
  239 + * @param int $length
2
Guilherme Blanco Owner

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

Guilherme Blanco Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
... ... @@ -265,6 +272,7 @@ protected function getVarcharTypeDeclarationSQLSnippet($length, $fixed)
265 272 *
266 273 * @param string $dbType
267 274 * @param string $doctrineType
  275 + * @throws \Doctrine\DBAL\DBALException if the type is not found
1
Guilherme Blanco Owner

Missing line break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
... ... @@ -669,7 +677,7 @@ public function getLowerExpression($str)
669 677 * @param string $str literal string
670 678 * @param string $substr literal string to find
671 679 * @param integer $startPos position to start at, beginning of string by default
672   - * @return integer
  680 + * @return string
1
Guilherme Blanco Owner

Missing line break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
... ... @@ -700,9 +708,9 @@ public function getNowExpression()
700 708 */
701 709 public function getSubstringExpression($value, $from, $len = null)
702 710 {
703   - if ($len === null)
3
Guilherme Blanco Owner

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.

Christophe Coevoet
stof added a note

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

Guilherme Blanco Owner

Then feel free to modify it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Don't Add Me To Your Organization a.k.a The Travis Bot

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

Alexander asm89 merged commit 8f783fb into from
Alexander asm89 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Aug 07, 2012
Christophe Coevoet stof Fixed some phpdoc 3c9bbcf
Christophe Coevoet stof fixed more phpdoc and CS in the platforms da06cdb
Something went wrong with that request. Please try again.