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

add isSuccess method to Document #40

Merged
merged 1 commit into from
Jan 11, 2019
Merged

Conversation

Fivell
Copy link
Contributor

@Fivell Fivell commented Jan 7, 2019

just for alternative usage of else/if statement after document initialization

allows hadle success block in if statement in more readable way

before

if !($document->hasErrors()){ ... }

after

if $document->isSuccess() { ... }

Description

add new method to Document class

Motivation and context

allows to check Document instance is successful

How has this been tested?

Unit test

just for alternative usage of else/if statement after document initialization

allows hadle success block in if statement in more readable way

before
```
if !($document->hasErrors()){ ... }
```

after

```
if $document->isSuccess() { ... }
```
@Fivell Fivell force-pushed the add_is_success_method branch from e606b91 to c0729e7 Compare January 7, 2019 16:14
@JaZo
Copy link
Member

JaZo commented Jan 11, 2019

Thanks!

@JaZo JaZo merged commit f854fc0 into swisnl:master Jan 11, 2019
@Fivell Fivell deleted the add_is_success_method branch January 11, 2019 09:39
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