minor #30003 Remove unreachable code (TysonAndre)

This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #30003).

Discussion
----------

Remove unreachable code

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | (unreachable)
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | n/a (unreachable)    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

The try/finally block will either return or throw.
Additionally, $socket was never defined.

Detected via static analysis

Commits
-------

2fb8f49146 Remove unreachable code
This commit is contained in:
Nicolas Grekas 2019-01-28 19:04:02 +01:00
commit fceb2a2de4

View File

@ -91,7 +91,5 @@ class Connection
} finally {
restore_error_handler();
}
return $socket;
}
}