Completed
Push — master ( 945ecc...a8263b )
by Manuel
02:39
created
app/Http/Requests/Request.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 
7 7
 abstract class Request extends FormRequest
8 8
 {
9
-    public function __construct()
10
-    {
11
-        parent::__construct();
9
+	public function __construct()
10
+	{
11
+		parent::__construct();
12 12
 
13
-        $this->validateMac();
14
-    }
13
+		$this->validateMac();
14
+	}
15 15
 
16
-    public function validateMac()
17
-    {
18
-        app('validator')->extend('mac', function ($attribute, $value, $parameters) {
19
-            return preg_match('/^(([0-9a-fA-F]{2}-){5}|([0-9a-fA-F]{2}:){5})[0-9a-fA-F]{2}$/', $value);
20
-        });
21
-    }
16
+	public function validateMac()
17
+	{
18
+		app('validator')->extend('mac', function ($attribute, $value, $parameters) {
19
+			return preg_match('/^(([0-9a-fA-F]{2}-){5}|([0-9a-fA-F]{2}:){5})[0-9a-fA-F]{2}$/', $value);
20
+		});
21
+	}
22 22
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function validateMac()
17 17
     {
18
-        app('validator')->extend('mac', function ($attribute, $value, $parameters) {
18
+        app('validator')->extend('mac', function($attribute, $value, $parameters) {
19 19
             return preg_match('/^(([0-9a-fA-F]{2}-){5}|([0-9a-fA-F]{2}:){5})[0-9a-fA-F]{2}$/', $value);
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
app/Http/Requests/StoreComputerRequest.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -6,34 +6,34 @@
 block discarded – undo
6 6
 
7 7
 class StoreComputerRequest extends Request
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'ip'     => 'required|ip',
28
-            'mac'    => 'required|mac',
29
-            'name'   => 'required',
30
-            'group'  => 'alpha_dash|max:30',
31
-            'public' => 'in:true,false,auto',
32
-        ];
33
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'ip'     => 'required|ip',
28
+			'mac'    => 'required|mac',
29
+			'name'   => 'required',
30
+			'group'  => 'alpha_dash|max:30',
31
+			'public' => 'in:true,false,auto',
32
+		];
33
+	}
34 34
 
35
-    public function response(array $errors)
36
-    {
37
-        return new JsonResponse($errors, 422);
38
-    }
35
+	public function response(array $errors)
36
+	{
37
+		return new JsonResponse($errors, 422);
38
+	}
39 39
 }
Please login to merge, or discard this patch.
app/Http/routes.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 Route::get('/stats', 'WelcomeController@statistics');
8 8
 
9 9
 Route::group(['prefix' => 'api/v1', 'namespace' => 'Api'], function () {
10
-    Route::resource('devices', 'DeviceController', ['except' => ['create', 'edit']]);
10
+	Route::resource('devices', 'DeviceController', ['except' => ['create', 'edit']]);
11 11
 
12
-    Route::post('devices/poke', [
13
-        'as'   => 'api.v1.devices.poke',
14
-        'uses' => 'DeviceController@poke',
15
-    ]);
12
+	Route::post('devices/poke', [
13
+		'as'   => 'api.v1.devices.poke',
14
+		'uses' => 'DeviceController@poke',
15
+	]);
16 16
 });
17 17
 
18 18
 Route::get('/@{group}', 'GroupController@show');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 Route::get('/stats', 'WelcomeController@statistics');
8 8
 
9
-Route::group(['prefix' => 'api/v1', 'namespace' => 'Api'], function () {
9
+Route::group(['prefix' => 'api/v1', 'namespace' => 'Api'], function() {
10 10
     Route::resource('devices', 'DeviceController', ['except' => ['create', 'edit']]);
11 11
 
12 12
     Route::post('devices/poke', [
Please login to merge, or discard this patch.
app/Observers/DeviceObserver.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,21 +6,21 @@
 block discarded – undo
6 6
 
7 7
 class DeviceObserver
8 8
 {
9
-    /**
10
-     * @var PusherManager
11
-     */
12
-    protected $pusher;
9
+	/**
10
+	 * @var PusherManager
11
+	 */
12
+	protected $pusher;
13 13
 
14
-    /**
15
-     * DeviceObserver constructor.
16
-     */
17
-    public function __construct(PusherManager $pusher)
18
-    {
19
-        $this->pusher = $pusher;
20
-    }
14
+	/**
15
+	 * DeviceObserver constructor.
16
+	 */
17
+	public function __construct(PusherManager $pusher)
18
+	{
19
+		$this->pusher = $pusher;
20
+	}
21 21
 
22
-    public function deleted($device)
23
-    {
24
-        $this->pusher->trigger(env('PUSHER_CHANNEL', 'pi-finder'), 'DeviceWasDeleted', ['device' => $device->toArray()]);
25
-    }
22
+	public function deleted($device)
23
+	{
24
+		$this->pusher->trigger(env('PUSHER_CHANNEL', 'pi-finder'), 'DeviceWasDeleted', ['device' => $device->toArray()]);
25
+	}
26 26
 }
Please login to merge, or discard this patch.
app/Poke.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 class Poke extends Model
8 8
 {
9
-    protected $fillable = ['ip', 'mac'];
9
+	protected $fillable = ['ip', 'mac'];
10 10
 }
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@
 block discarded – undo
7 7
 
8 8
 class AppServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * Bootstrap any application services.
12
-     */
13
-    public function boot()
14
-    {
15
-        //
16
-    }
10
+	/**
11
+	 * Bootstrap any application services.
12
+	 */
13
+	public function boot()
14
+	{
15
+		//
16
+	}
17 17
 
18
-    /**
19
-     * Register any application services.
20
-     */
21
-    public function register()
22
-    {
23
-        $this->app->bind(
24
-            'Illuminate\Contracts\Auth\Registrar',
25
-            Registrar::class
26
-        );
27
-    }
18
+	/**
19
+	 * Register any application services.
20
+	 */
21
+	public function register()
22
+	{
23
+		$this->app->bind(
24
+			'Illuminate\Contracts\Auth\Registrar',
25
+			Registrar::class
26
+		);
27
+	}
28 28
 }
Please login to merge, or discard this patch.
app/Providers/BusServiceProvider.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -7,25 +7,25 @@
 block discarded – undo
7 7
 
8 8
 class BusServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * Bootstrap any application services.
12
-     *
13
-     * @param \Illuminate\Bus\Dispatcher $dispatcher
14
-     */
15
-    public function boot(Dispatcher $dispatcher)
16
-    {
17
-        $dispatcher->mapUsing(function ($command) {
18
-            return Dispatcher::simpleMapping(
19
-                $command, 'PiFinder\Commands', 'PiFinder\Handlers\Commands'
20
-            );
21
-        });
22
-    }
10
+	/**
11
+	 * Bootstrap any application services.
12
+	 *
13
+	 * @param \Illuminate\Bus\Dispatcher $dispatcher
14
+	 */
15
+	public function boot(Dispatcher $dispatcher)
16
+	{
17
+		$dispatcher->mapUsing(function ($command) {
18
+			return Dispatcher::simpleMapping(
19
+				$command, 'PiFinder\Commands', 'PiFinder\Handlers\Commands'
20
+			);
21
+		});
22
+	}
23 23
 
24
-    /**
25
-     * Register any application services.
26
-     */
27
-    public function register()
28
-    {
29
-        //
30
-    }
24
+	/**
25
+	 * Register any application services.
26
+	 */
27
+	public function register()
28
+	{
29
+		//
30
+	}
31 31
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function boot(Dispatcher $dispatcher)
16 16
     {
17
-        $dispatcher->mapUsing(function ($command) {
17
+        $dispatcher->mapUsing(function($command) {
18 18
             return Dispatcher::simpleMapping(
19 19
                 $command, 'PiFinder\Commands', 'PiFinder\Handlers\Commands'
20 20
             );
Please login to merge, or discard this patch.
app/Providers/ConfigServiceProvider.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 
7 7
 class ConfigServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Overwrite any vendor / package configuration.
11
-     *
12
-     * This service provider is intended to provide a convenient location for you
13
-     * to overwrite any "vendor" or package configuration that you may want to
14
-     * modify before the application handles the incoming request / command.
15
-     */
16
-    public function register()
17
-    {
18
-        config([
19
-            //
20
-        ]);
21
-    }
9
+	/**
10
+	 * Overwrite any vendor / package configuration.
11
+	 *
12
+	 * This service provider is intended to provide a convenient location for you
13
+	 * to overwrite any "vendor" or package configuration that you may want to
14
+	 * modify before the application handles the incoming request / command.
15
+	 */
16
+	public function register()
17
+	{
18
+		config([
19
+			//
20
+		]);
21
+	}
22 22
 }
Please login to merge, or discard this patch.
app/Providers/EventServiceProvider.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,27 +7,27 @@
 block discarded – undo
7 7
 
8 8
 class EventServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * The event handler mappings for the application.
12
-     *
13
-     * @var array
14
-     */
15
-    protected $listen = [
16
-        'PiFinder\Events\ServerWasPoked' => [
17
-            'PiFinder\Handlers\Events\NotifyUsersAboutPoke',
18
-            'PiFinder\Handlers\Events\UpdateStatistics',
19
-        ],
20
-    ];
10
+	/**
11
+	 * The event handler mappings for the application.
12
+	 *
13
+	 * @var array
14
+	 */
15
+	protected $listen = [
16
+		'PiFinder\Events\ServerWasPoked' => [
17
+			'PiFinder\Handlers\Events\NotifyUsersAboutPoke',
18
+			'PiFinder\Handlers\Events\UpdateStatistics',
19
+		],
20
+	];
21 21
 
22
-    /**
23
-     * Register any other events for your application.
24
-     *
25
-     * @param \Illuminate\Contracts\Events\Dispatcher $events
26
-     */
27
-    public function boot(DispatcherContract $events)
28
-    {
29
-        parent::boot($events);
22
+	/**
23
+	 * Register any other events for your application.
24
+	 *
25
+	 * @param \Illuminate\Contracts\Events\Dispatcher $events
26
+	 */
27
+	public function boot(DispatcherContract $events)
28
+	{
29
+		parent::boot($events);
30 30
 
31
-        //
32
-    }
31
+		//
32
+	}
33 33
 }
Please login to merge, or discard this patch.