@@ -72,7 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | parent::boot(); |
| 74 | 74 | |
| 75 | - self::creating(function ($user) { |
|
| 75 | + self::creating(function($user) { |
|
| 76 | 76 | if (!$user->api_key) { |
| 77 | 77 | $user->api_key = self::generateApiKey(); |
| 78 | 78 | } |
@@ -25,11 +25,11 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function boot(Dispatcher $dispatcher) |
| 27 | 27 | { |
| 28 | - $dispatcher->mapUsing(function ($command) { |
|
| 28 | + $dispatcher->mapUsing(function($command) { |
|
| 29 | 29 | return Dispatcher::simpleMapping($command, 'Gitamin', 'Gitamin\Handlers'); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - Str::macro('canonicalize', function ($url) { |
|
| 32 | + Str::macro('canonicalize', function($url) { |
|
| 33 | 33 | return preg_replace('/([^\/])$/', '$1/', $url); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | protected function registerDateFactory() |
| 53 | 53 | { |
| 54 | - $this->app->singleton(DateFactory::class, function ($app) { |
|
| 54 | + $this->app->singleton(DateFactory::class, function($app) { |
|
| 55 | 55 | $appTimezone = $app->config->get('app.timezone'); |
| 56 | 56 | $gitamInimezone = $app->config->get('gitamin.timezone'); |
| 57 | 57 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function register() |
| 71 | 71 | { |
| 72 | - $this->app->bindShared('setting', function () { |
|
| 72 | + $this->app->bindShared('setting', function() { |
|
| 73 | 73 | return new Repository(new SettingModel()); |
| 74 | 74 | }); |
| 75 | 75 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | public function map(Router $router) |
| 65 | 65 | { |
| 66 | - $router->group(['namespace' => $this->namespace], function (Router $router) { |
|
| 66 | + $router->group(['namespace' => $this->namespace], function(Router $router) { |
|
| 67 | 67 | foreach (glob(app_path('Http//Routes').'/*.php') as $file) { |
| 68 | 68 | $this->app->make('Gitamin\\Http\\Routes\\'.basename($file, '.php'))->map($router); |
| 69 | 69 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | 'team_id' => $command->team_id, |
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | - return array_filter($params, function ($val) { |
|
| 57 | + return array_filter($params, function($val) { |
|
| 58 | 58 | return $val !== null; |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | 'team_id' => $command->team_id, |
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | - return array_filter($params, function ($val) { |
|
| 57 | + return array_filter($params, function($val) { |
|
| 58 | 58 | return $val !== null; |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | 'middleware' => ['app.hasSetting', 'guest'], |
| 30 | 30 | 'setting' => 'app_name', |
| 31 | 31 | 'as' => 'signup.', |
| 32 | - ], function ($router) { |
|
| 32 | + ], function($router) { |
|
| 33 | 33 | $router->get('signup/invite/{code}', [ |
| 34 | 34 | 'as' => 'invite', |
| 35 | 35 | 'uses' => 'SignupController@getSignup', |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | parent::boot(); |
| 74 | 74 | |
| 75 | - self::creating(function ($user) { |
|
| 75 | + self::creating(function($user) { |
|
| 76 | 76 | if (!$user->api_key) { |
| 77 | 77 | $user->api_key = self::generateApiKey(); |
| 78 | 78 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $allIssues = Issue::whereBetween('created_at', [ |
| 88 | 88 | $this->startDate->copy()->subDays(30)->format('Y-m-d').' 00:00:00', |
| 89 | 89 | $this->startDate->format('Y-m-d').' 23:59:59', |
| 90 | - ])->orderBy('created_at', 'desc')->get()->groupBy(function (Issue $issue) { |
|
| 90 | + ])->orderBy('created_at', 'desc')->get()->groupBy(function(Issue $issue) { |
|
| 91 | 91 | return (new Date($issue->created_at)) |
| 92 | 92 | ->setTimezone($this->dateTimeZone)->toDateString(); |
| 93 | 93 | }); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // Sort the array so it takes into account the added days |
| 105 | - $allIssues = $allIssues->sortBy(function ($value, $key) { |
|
| 105 | + $allIssues = $allIssues->sortBy(function($value, $key) { |
|
| 106 | 106 | return strtotime($key); |
| 107 | 107 | }, SORT_REGULAR, false); |
| 108 | 108 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $allSubscribers = Subscriber::whereBetween('created_at', [ |
| 120 | 120 | $this->startDate->copy()->subDays(30)->format('Y-m-d').' 00:00:00', |
| 121 | 121 | $this->startDate->format('Y-m-d').' 23:59:59', |
| 122 | - ])->orderBy('created_at', 'desc')->get()->groupBy(function (Subscriber $issue) { |
|
| 122 | + ])->orderBy('created_at', 'desc')->get()->groupBy(function(Subscriber $issue) { |
|
| 123 | 123 | return (new Date($issue->created_at)) |
| 124 | 124 | ->setTimezone($this->dateTimeZone)->toDateString(); |
| 125 | 125 | }); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | // Sort the array so it takes into account the added days |
| 137 | - $allSubscribers = $allSubscribers->sortBy(function ($value, $key) { |
|
| 137 | + $allSubscribers = $allSubscribers->sortBy(function($value, $key) { |
|
| 138 | 138 | return strtotime($key); |
| 139 | 139 | }, SORT_REGULAR, false); |
| 140 | 140 | |