From 80115ef57ab63871c700cd64ca6433bca2c4fd82 Mon Sep 17 00:00:00 2001 From: oscarotero Date: Wed, 24 Jan 2018 22:02:48 +0100 Subject: [PATCH] v1.0.0 --- CHANGELOG.md | 4 ++-- src/BasePath.php | 4 ++-- tests/BasePathTest.php | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1e85c6..ad3879d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [UNRELEASED] +## [1.0.0] - 2017-01-24 ### Added @@ -63,7 +63,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). First version -[UNRELEASED]: https://github.com/middlewares/base-path/compare/v0.5.0...HEAD +[1.0.0]: https://github.com/middlewares/base-path/compare/v0.5.0...v1.0.0 [0.5.0]: https://github.com/middlewares/base-path/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/middlewares/base-path/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/middlewares/base-path/compare/v0.2.0...v0.3.0 diff --git a/src/BasePath.php b/src/BasePath.php index cec3346..d4bbb2c 100644 --- a/src/BasePath.php +++ b/src/BasePath.php @@ -25,7 +25,7 @@ class BasePath implements MiddlewareInterface */ public function __construct(string $basePath) { - $this->basePath = rtrim((string) $basePath, '/'); + $this->basePath = rtrim($basePath, '/'); if (substr($this->basePath, 0, 1) !== '/') { $this->basePath = '/'.$this->basePath; @@ -37,7 +37,7 @@ public function __construct(string $basePath) */ public function fixLocation(bool $fixLocation = true): self { - $this->fixLocation = (bool) $fixLocation; + $this->fixLocation = $fixLocation; return $this; } diff --git a/tests/BasePathTest.php b/tests/BasePathTest.php index e9cd9bd..b99e8f1 100644 --- a/tests/BasePathTest.php +++ b/tests/BasePathTest.php @@ -74,7 +74,6 @@ function ($request) use ($location) { }, ], $request); - $this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response); $this->assertEquals($result, (string) $response->getBody()); $this->assertEquals($location, $response->getHeaderLine('Location')); }