Skip to content

Commit adaee3f

Browse files
committed
Merge branch 'master' of github.com:beyondcode/laravel-mailbox
2 parents 729ac73 + abdadc2 commit adaee3f

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
"sort-packages": true
5050
},
5151
"extra": {
52+
"branch-alias": {
53+
"dev-master": "1.0-dev"
54+
},
5255
"laravel": {
5356
"providers": [
5457
"BeyondCode\\Mailbox\\MailboxServiceProvider"

src/Console/CleanEmails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CleanEmails extends Command
1414

1515
public function handle()
1616
{
17-
$this->comment('Cleaning WebSocket Statistics...');
17+
$this->comment('Cleaning old incoming email logs...');
1818

1919
$maxAgeInDays = config('mailbox.store_incoming_emails_for_days');
2020

src/Routing/Router.php

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ public function __construct(Container $container = null)
2727
$this->routes = new RouteCollection;
2828
}
2929

30-
public function from(string $pattern, $action)
30+
public function from(string $pattern, $action) : Route
3131
{
32-
$this->addRoute(Route::FROM, $pattern, $action);
32+
return $this->addRoute(Route::FROM, $pattern, $action);
3333
}
3434

35-
public function to(string $pattern, $action)
35+
public function to(string $pattern, $action) : Route
3636
{
37-
$this->addRoute(Route::TO, $pattern, $action);
37+
return $this->addRoute(Route::TO, $pattern, $action);
3838
}
3939

40-
public function cc(string $pattern, $action)
40+
public function cc(string $pattern, $action) : Route
4141
{
42-
$this->addRoute(Route::CC, $pattern, $action);
42+
return $this->addRoute(Route::CC, $pattern, $action);
4343
}
4444

45-
public function subject(string $pattern, $action)
45+
public function subject(string $pattern, $action) : Route
4646
{
47-
$this->addRoute(Route::SUBJECT, $pattern, $action);
47+
return $this->addRoute(Route::SUBJECT, $pattern, $action);
4848
}
4949

5050
public function fallback($action)
@@ -57,12 +57,16 @@ public function catchAll($action)
5757
$this->catchAllRoute = $this->createRoute(Route::CATCH_ALL, '', $action);
5858
}
5959

60-
protected function addRoute(string $subject, string $pattern, $action)
60+
protected function addRoute(string $subject, string $pattern, $action) : Route
6161
{
62-
$this->routes->add($this->createRoute($subject, $pattern, $action));
62+
$route = $this->createRoute($subject, $pattern, $action);
63+
64+
$this->routes->add($route);
65+
66+
return $route;
6367
}
6468

65-
protected function createRoute(string $subject, string $pattern, $action)
69+
protected function createRoute(string $subject, string $pattern, $action) : Route
6670
{
6771
return (new Route($subject, $pattern, $action))
6872
->setContainer($this->container);

0 commit comments

Comments
 (0)