[Refactor] Small changes to Http\Request

### In This PR

* improve consistency between `segment` and `segments` method
 * the `segment` method has been DRY'd out so that it uses the `segments` method, this improves consistency between the methods and makes the expected return values from each method more reliable  
* add braces around control structures containing a single line as their body
 * this is required by [PSR 2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#5-control-structures) and stops me from bitting my nails