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

Cleanup #6

Merged
merged 6 commits into from
Feb 6, 2018
Merged

Cleanup #6

merged 6 commits into from
Feb 6, 2018

Conversation

dragosprotung
Copy link

No description provided.

Copy link
Owner

@GuilhemN GuilhemN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! Looks pretty good so far 👍

*
* @param string $name
*
* @return Schema
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not add php docs not bringing new information, it just makes the code harder to read imo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I will remove it

@@ -114,6 +114,8 @@ public function getAllowEmptyValue()
* Default value is `false`.
*
* @param bool $allowEmptyValue
*
* @return Parameter
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding php type hints instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about doing it. There are already places where they are used. But of course this will be without BC. So if it's OK with you I can add to all methods arguments and returns.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as classes are final this is fine :)

@@ -39,7 +39,7 @@
/** @var bool|null */
private $allowEmptyValue;

public function __construct($data = [])
public function __construct(array $data = [])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these, they're here on purpose to allow ArrayObject and stdClass.

@@ -34,6 +34,8 @@ public function getRef()

/**
* @param string|null $ref
*
* @return RefPart
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$this

@dragosprotung
Copy link
Author

Should I add type hints for the traits as well ? They are marked as internal

@GuilhemN
Copy link
Owner

GuilhemN commented Feb 5, 2018

Sure :)

@GuilhemN GuilhemN merged commit 1456c64 into GuilhemN:master Feb 6, 2018
@GuilhemN
Copy link
Owner

GuilhemN commented Feb 6, 2018

Thank you @dragosprotung! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants