Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
Used coleshing opeartor
Browse files Browse the repository at this point in the history
  • Loading branch information
Configuration Manager committed Sep 23, 2019
1 parent 2939eec commit e672a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- update composer.json
- using php 7.3 in travis and scrutinizer
- used php 7 null coalescing operator

## 0.1.0

Expand Down
6 changes: 3 additions & 3 deletions src/UrlRewriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
$parsedNewUrl = parse_url($invariantUriPart.$replacedUriPart );

$request = $request->withUri(
$uri->withPath($parsedNewUrl['path']?:'')
->withQuery($parsedNewUrl['query']?:'')
->withFragment($parsedNewUrl['fragment']?:'')
$uri->withPath($parsedNewUrl['path'] ?? '')
->withQuery($parsedNewUrl['query'] ?? '')
->withFragment($parsedNewUrl['fragment'] ?? '')
);

return $handler->handle($request);
Expand Down

0 comments on commit e672a87

Please sign in to comment.