Page MenuHomeDevCentral

No OneTemporary

diff --git a/app/Console/Commands/ConfigShow.php b/app/Console/Commands/ConfigShow.php
index 2d99b54..c69ed23 100644
--- a/app/Console/Commands/ConfigShow.php
+++ b/app/Console/Commands/ConfigShow.php
@@ -1,105 +1,105 @@
<?php
namespace Nasqueron\Notifications\Console\Commands;
use Illuminate\Console\Command;
use Nasqueron\Notifications\Config\Reporting\ConfigReport;
-class ConfigShow extends Command
-{
+class ConfigShow extends Command {
+
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'config:show';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Show notifications center configuration';
/**
* @var \Nasqueron\Notifications\Config\Reporting\ConfigReport
*/
private $report;
///
/// Prepare information tables
///
/**
* Gets the services (defined in credentials.json) as table rows.
*
* @return array
*/
protected function getServicesTableRows () : array {
$rows = [];
foreach ($this->report->services as $service) {
$rows[] = $service->toFancyArray();
}
return $rows;
}
/**
* Gets features as table rows
*
* @return array
*/
protected function getFeaturesTableRows () : array {
$rows = [];
foreach ($this->report->features as $feature) {
$rows[] = $feature->toFancyArray();
}
return $rows;
}
///
/// Handle the command
///
/**
* Executes the console command.
*/
public function handle () : void {
$this->prepareReport();
$this->printGates();
$this->printFeatures();
$this->printServices();
}
protected final function prepareReport() : void {
$this->report = new ConfigReport();
}
protected final function printGates () : void {
$this->info("Gates:\n");
foreach ($this->report->gates as $gate) {
$this->line('- ' . $gate);
}
}
protected final function printFeatures () : void {
$this->info("\nFeatures:\n");
$this->table(
['Feature', 'Enabled'],
$this->getFeaturesTableRows()
);
}
protected final function printServices () : void {
$this->info("\nServices declared in credentials:\n");
$this->table(
['Gate', 'Door', 'Instance', 'Status'],
$this->getServicesTableRows()
);
}
}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index 605def3..06c43f5 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -1,70 +1,70 @@
<?php
namespace Nasqueron\Notifications\Console;
use Illuminate\Console\Command;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
-class Kernel extends ConsoleKernel
-{
+class Kernel extends ConsoleKernel {
+
/**
* The Artisan commands provided by your application.
*
* @var string[]
*/
protected $commands = [
\Nasqueron\Notifications\Console\Commands\ConfigShow::class,
\Nasqueron\Notifications\Console\Commands\ConfigValidate::class,
\Nasqueron\Notifications\Console\Commands\Inspire::class,
\Nasqueron\Notifications\Console\Commands\NotificationsPayload::class,
\Nasqueron\Notifications\Console\Commands\PhabricatorProjectsMap::class,
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule (Schedule $schedule) : void {
$schedule->command('inspire')
->hourly();
}
/**
* Gets a command by name
*
* @param string $name The command name (first word of the command signature)
* @return \Illuminate\Console\Command
* @throws \RuntimeException when command doesn't exit
*/
public function get (string $name) : Command {
$commands = $this->all();
if (array_key_exists($name, $commands)) {
return $commands[$name];
}
throw new \RuntimeException("Command $name doesn't exist.");
}
/**
* Gets a command by class
*
* @param string $class The command class
* @return \Illuminate\Console\Command
* @throws \RuntimeException when command doesn't exit
*/
public function getByClass (string $class) : Command {
$commands = $this->all();
foreach ($commands as $command) {
if ($command instanceof $class) {
return $command;
}
}
throw new \RuntimeException("Command $class doesn't exist.");
}
}
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
index 109f784..547f57b 100644
--- a/app/Http/Controllers/Controller.php
+++ b/app/Http/Controllers/Controller.php
@@ -1,13 +1,13 @@
<?php
namespace Nasqueron\Notifications\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
-abstract class Controller extends BaseController
-{
+abstract class Controller extends BaseController {
+
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index f2eb06f..bbf747b 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -1,30 +1,30 @@
<?php
namespace Nasqueron\Notifications\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
-class Kernel extends HttpKernel
-{
+class Kernel extends HttpKernel {
+
/**
* The application's global HTTP middleware stack.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Nasqueron\Notifications\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\Nasqueron\Notifications\Http\Middleware\VerifyCsrfToken::class,
];
/**
* The application's route middleware.
*
* @var array
*/
protected $routeMiddleware = [
];
}
diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php
index 38b485a..8b3715d 100644
--- a/app/Http/Middleware/EncryptCookies.php
+++ b/app/Http/Middleware/EncryptCookies.php
@@ -1,17 +1,17 @@
<?php
namespace Nasqueron\Notifications\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
-class EncryptCookies extends BaseEncrypter
-{
+class EncryptCookies extends BaseEncrypter {
+
/**
* The names of the cookies that should not be encrypted.
*
* @var string[]
*/
protected $except = [
//
];
}
diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php
index a6160ec..aa04717 100644
--- a/app/Http/Middleware/VerifyCsrfToken.php
+++ b/app/Http/Middleware/VerifyCsrfToken.php
@@ -1,17 +1,17 @@
<?php
namespace Nasqueron\Notifications\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
-class VerifyCsrfToken extends BaseVerifier
-{
+class VerifyCsrfToken extends BaseVerifier {
+
/**
* The URIs that should be excluded from CSRF verification.
*
* @var string[]
*/
protected $except = [
'gate/*',
];
}
diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php
index b991335..f51d412 100644
--- a/app/Http/Requests/Request.php
+++ b/app/Http/Requests/Request.php
@@ -1,10 +1,10 @@
<?php
namespace Nasqueron\Notifications\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
-abstract class Request extends FormRequest
-{
+abstract class Request extends FormRequest {
+
//
}
diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php
index 5ddcb77..ea931c9 100644
--- a/app/Jobs/Job.php
+++ b/app/Jobs/Job.php
@@ -1,21 +1,21 @@
<?php
namespace Nasqueron\Notifications\Jobs;
use Illuminate\Bus\Queueable;
-abstract class Job
-{
+abstract class Job {
+
/*
|--------------------------------------------------------------------------
| Queueable Jobs
|--------------------------------------------------------------------------
|
| This job base class provides a central location to place any logic that
| is shared across all of your jobs. The trait included with the class
| provides access to the "onQueue" and "delay" queue helper methods.
|
*/
use Queueable;
}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 9cb7c30..006af3a 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -1,28 +1,28 @@
<?php
namespace Nasqueron\Notifications\Providers;
use Illuminate\Support\ServiceProvider;
-class AppServiceProvider extends ServiceProvider
-{
+class AppServiceProvider extends ServiceProvider {
+
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
diff --git a/app/Providers/PhabricatorAPIServiceProvider.php b/app/Providers/PhabricatorAPIServiceProvider.php
index 64e77dc..dc7aaf0 100644
--- a/app/Providers/PhabricatorAPIServiceProvider.php
+++ b/app/Providers/PhabricatorAPIServiceProvider.php
@@ -1,29 +1,29 @@
<?php
namespace Nasqueron\Notifications\Providers;
use Illuminate\Support\ServiceProvider;
use Nasqueron\Notifications\Phabricator\PhabricatorAPIFactory;
-class PhabricatorAPIServiceProvider extends ServiceProvider
-{
+class PhabricatorAPIServiceProvider extends ServiceProvider {
+
/**
* Bootstraps the application services.
*
* @return void
*/
public function boot() {
}
/**
* Registers the application services.
*
* @return void
*/
public function register() {
$this->app->singleton('phabricator-api', function () {
return new PhabricatorAPIFactory;
});
}
}
diff --git a/app/Providers/PhabricatorProjectsMapServiceProvider.php b/app/Providers/PhabricatorProjectsMapServiceProvider.php
index f6487f2..e762cfa 100644
--- a/app/Providers/PhabricatorProjectsMapServiceProvider.php
+++ b/app/Providers/PhabricatorProjectsMapServiceProvider.php
@@ -1,29 +1,29 @@
<?php
namespace Nasqueron\Notifications\Providers;
use Illuminate\Support\ServiceProvider;
use Nasqueron\Notifications\Phabricator\ProjectsMapFactory;
-class PhabricatorProjectsMapServiceProvider extends ServiceProvider
-{
+class PhabricatorProjectsMapServiceProvider extends ServiceProvider {
+
/**
* Bootstraps the application services.
*
* @return void
*/
public function boot() {
}
/**
* Registers the application services.
*
* @return void
*/
public function register() {
$this->app->singleton('phabricator-projectsmap', function () {
return new ProjectsMapFactory;
});
}
}
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index 7806261..78624c6 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -1,44 +1,44 @@
<?php
namespace Nasqueron\Notifications\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
-class RouteServiceProvider extends ServiceProvider
-{
+class RouteServiceProvider extends ServiceProvider {
+
/**
* This namespace is applied to the controller routes in your routes file.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'Nasqueron\Notifications\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function boot(Router $router)
{
//
parent::boot($router);
}
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
$router->group(['namespace' => $this->namespace], function ($router) {
require app_path('Http/routes.php');
});
}
}
diff --git a/app/Providers/SentryServiceProvider.php b/app/Providers/SentryServiceProvider.php
index 061c360..cd7d2e2 100644
--- a/app/Providers/SentryServiceProvider.php
+++ b/app/Providers/SentryServiceProvider.php
@@ -1,30 +1,30 @@
<?php
namespace Nasqueron\Notifications\Providers;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\ServiceProvider;
-class SentryServiceProvider extends ServiceProvider
-{
+class SentryServiceProvider extends ServiceProvider {
+
/**
* Bootstraps the application services.
*
* @return void
*/
public function boot() {
}
/**
* Registers the application services.
*
* @return void
*/
public function register() {
$this->app->singleton('raven', function (Application $app) {
$config = $app->make('config');
$dsn = $config->get('services.sentry.dsn');
return new \Raven_Client($dsn);
});
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Mar 7, 01:38 (6 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3493241
Default Alt Text
(13 KB)

Event Timeline