src/Utils/BasePathTrait.php 1 location
|
@@ 21-25 (lines=5) @@
|
| 18 |
|
*/ |
| 19 |
|
public function basePath($basePath) |
| 20 |
|
{ |
| 21 |
|
if (strlen($basePath) > 1 && substr($basePath, -1) === '/') { |
| 22 |
|
$this->basePath = substr($basePath, 0, -1); |
| 23 |
|
} else { |
| 24 |
|
$this->basePath = $basePath; |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
return $this; |
| 28 |
|
} |
src/Middleware/TrailingSlash.php 1 location
|
@@ 50-54 (lines=5) @@
|
| 47 |
|
if (strlen($path) > 1 && substr($path, -1) !== '/' && !pathinfo($path, PATHINFO_EXTENSION)) { |
| 48 |
|
$path .= '/'; |
| 49 |
|
} |
| 50 |
|
} else { |
| 51 |
|
if (strlen($path) > 1 && substr($path, -1) === '/') { |
| 52 |
|
$path = substr($path, 0, -1); |
| 53 |
|
} |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
//Ensure the path has one "/" |
| 57 |
|
if ($path === '') { |