Skip to content
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

Merged
merged 1 commit into from
Jun 21, 2013
Merged

Documentation fixes #243

merged 1 commit into from
Jun 21, 2013

Conversation

BenMorel
Copy link
Contributor

@BenMorel 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
Copy link
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
Copy link
Contributor Author

BenMorel commented Jan 7, 2013

@Ocramius it is complete!

@Ocramius
Copy link
Member

Ocramius commented Jan 7, 2013

Please squash then :S

@BenMorel
Copy link
Contributor Author

BenMorel commented Jan 7, 2013

Squashed :-)

@BenMorel
Copy link
Contributor Author

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
Copy link
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
Copy link
Contributor Author

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?

@Ocramius
Copy link
Member

Ocramius commented Jan 7, 2013

@BenMorel
Copy link
Contributor Author

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.

* @author Jonathan H. Wage <[email protected]
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision: 4628 $
Copy link
Member

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)

@BenMorel
Copy link
Contributor Author

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!

public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{
if ($arg2 === null) {
return $this->stmt->setFetchMode($fetchMode);
$this->stmt->setFetchMode($fetchMode);
Copy link
Member

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.

Copy link
Contributor Author

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:

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@guilhermeblanco
Copy link
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
Copy link
Contributor Author

BenMorel commented Jan 8, 2013

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

@BenMorel
Copy link
Contributor Author

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

@guilhermeblanco
Copy link
Member

I'm fine with the setFetchMode change

@BenMorel
Copy link
Contributor Author

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

@Ocramius
Copy link
Member

@BenMorel that's always useful =)

@BenMorel
Copy link
Contributor Author

Squashed!

@BenMorel
Copy link
Contributor Author

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
Copy link
Member

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

@BenMorel
Copy link
Contributor Author

@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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@beberlei
Copy link
Member

rebase pls

@BenMorel
Copy link
Contributor Author

@beberlei Rebased!

@beberlei
Copy link
Member

@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
@BenMorel
Copy link
Contributor Author

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

beberlei added a commit that referenced this pull request Jun 21, 2013
@beberlei beberlei merged commit 270cd8b into doctrine:master Jun 21, 2013
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants