-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation fixes #243
Documentation fixes #243
Conversation
@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... |
@Ocramius it is complete! |
Please squash then :S |
Squashed :-) |
Oops, I just noticed that some files are shown as entirely replaced, instead of just showing the diff. @Ocramius Any idea how to fix this? |
@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 |
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? |
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/EntityManager.php#L2-L18 And remove it from the class docs :) |
Thanks, I will do that. |
* @author Jonathan H. Wage <[email protected] | ||
* @link www.doctrine-project.org | ||
* @since 2.0 | ||
* @version $Revision: 4628 $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this $Revision
stuff which is a left-over from some SVN times (just like you removed it in the license header)
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) | ||
{ | ||
if ($arg2 === null) { | ||
return $this->stmt->setFetchMode($fetchMode); | ||
$this->stmt->setFetchMode($fetchMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, the online documentation has been fixed since.
Patch looks great, although some changes I highlighted are still required. |
@guilhermeblanco Thanks for your comments. I will have a look at them tonight. |
@guilhermeblanco Could you please comment on this and this? Thanks! |
I'm fine with the setFetchMode change |
Ok, we're good then! Do you want me to squash all the extra commits into the first one? |
@BenMorel that's always useful =) |
Squashed! |
I'm done with this job, do let me know if you have any comment! |
@@ -1559,8 +1634,8 @@ protected function onSchemaAlterTableRemoveColumn(Column $column, TableDiff $dif | |||
|
|||
/** | |||
* @param ColumnDiff $columnDiff | |||
* @param TableDiff $diff | |||
* @param array $columnSql | |||
* @param TableDiff $diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FQCN here and next line
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. |
Any other comments on this PR? |
Any update on this PR? I can rebase it on the current |
rebase pls |
@beberlei Rebased! |
@BenMorel still not mergable from the UI :( |
- 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
@beberlei Looks like there's been a new commit in the meantime. Rebased again! |
Carrying on with the work done on the ORM, here are my documentation fixes for the DBAL library:
@param
/@return
/@throws
annotations@param
annotationsIn addition:
return
statements onvoid
methods