8000 [Dotenv] improved code coverage and removed unreachable code by Stas-Soroka · Pull Request #29797 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Dotenv] improved code coverage and removed unreachable code #29797

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

Merged
merged 1 commit into from
Jan 13, 2019

Conversation

Stas-Soroka
Copy link
Contributor
Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

@chalasr chalasr added the Dotenv label Jan 6, 2019
@chalasr chalasr added this to the next milestone Jan 6, 2019
@@ -271,9 +271,6 @@ private function lexValue()
throw $this->createFormatException('Missing quote to end the value');
}
}
if ("\n" === $this->data[$this->cursor]) {
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that this can never be reached?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, on line 266 while loop executes until $this->data[$this->cursor] is equal to ", and if cursor reaches the end - throws FormatException. So, "\n" === $this->data[$this->cursor] will always resolve to false.

< 8000 div class="TimelineItem-badge ">
@fabpot fabpot force-pushed the improve_code_coverage branch from 7bfa6c3 to 34dac7c Compare January 13, 2019 16:52
@fabpot
Copy link
Member
fabpot commented Jan 13, 2019

Thank you @Stas-Soroka.

@fabpot fabpot merged commit 34dac7c into symfony:master Jan 13, 2019
fabpot added a commit that referenced this pull request Jan 13, 2019
…code (Stas-Soroka)

This PR was squashed before being merged into the 4.3-dev branch (closes #29797).

Discussion
----------

[Dotenv] improved code coverage and removed unreachable code

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

34dac7c [Dotenv] improved code coverage and removed unreachable code
@Stas-Soroka Stas-Soroka deleted the improve_code_coverage branch January 15, 2019 10:22
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0