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

Replaced asserts with type hints #304

Merged
merged 2 commits into from
Aug 31, 2018
Merged

Conversation

mamazu
Copy link
Member

@mamazu mamazu commented Aug 31, 2018

First part of the #238

@@ -27,13 +28,13 @@ public function it_throws_an_exception_if_order_token_is_not_a_string()
{
$this->beConstructedWith(new \stdClass(), 'COUPON_CODE');

$this->shouldThrow(\InvalidArgumentException::class)->duringInstantiation();
$this->shouldThrow(TypeError::class)->duringInstantiation();
Copy link
Member

Choose a reason for hiding this comment

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

But I would even think about removal of these tests right now. Strict types and scalar typehints should do the trick :)

@lchrusciel lchrusciel merged commit becb1d8 into Sylius:master Aug 31, 2018
@lchrusciel
Copy link
Member

Thanks @mamazu! 🐋

I hope you don't mind, that I have fixed the build.

@mamazu mamazu deleted the assert-to-typehint branch September 12, 2018 18:27
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.

2 participants