Skip to content

Commit 8ce1255

Browse files
author
Fady Michel R
committed
improvement
1 parent 1691cd2 commit 8ce1255

File tree

10 files changed

+64
-112
lines changed

10 files changed

+64
-112
lines changed

.gitignore

100644100755
File mode changed.

README.md

100644100755
File mode changed.

composer.json

100644100755
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "webbym/php-routing",
2+
"name": "webby/php-routing",
33
"description": "a simple routing php",
44
"type": "package",
55
"autoload": {
66
"psr-4": {
7-
"Webbym\\Routing\\": "src",
8-
"Test\\Webbym\\Routing\\": "test"
7+
"Webby\\Routing\\": "src",
8+
"Test\\Webby\\Routing\\": "tests"
99
}
1010
},
1111
"license": "MIT",
1212
"authors": [
1313
{
14-
"name": "Fad M.R",
15-
"email": "[email protected]"
14+
"name": "F.Michel",
15+
"email": "[email protected]"
1616
}
1717
],
1818
"require": {

composer.lock

100644100755
Lines changed: 49 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Route.php

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Webbym\Routing;
3+
namespace Webby\Routing;
44

55
/**
66
* Class Route
@@ -96,7 +96,8 @@ public function match(string $path)
9696
/**
9797
* @return string
9898
*/
99-
private function generateRegex() {
99+
private function generateRegex()
100+
{
100101

101102
$regex = $this->path;
102103
if ($this->hasVars()) {
@@ -268,7 +269,7 @@ public function setRequirements(array $requirements = []): Route
268269
* @param string $path
269270
* @return string
270271
*/
271-
private function trimPath(string $path)
272+
private function trimPath(string $path) :string
272273
{
273274

274275
return '/'.rtrim(ltrim(trim($path), '/'), '/');

src/RouteBuilderInterface.php

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33

4-
namespace Webbym\Routing;
4+
namespace Webby\Routing;
55

66
/**
77
* Interface RouteBuilderInterface

src/Router.php

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33

4-
namespace Webbym\Routing;
4+
namespace Webby\Routing;
55
use Psr\Http\Message\ServerRequestInterface;
66

77
/**

0 commit comments

Comments
 (0)