Completed
Push — master ( 521250...f55e31 )
by Manuel
04:22
created
app/Providers/AuthServiceProvider.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
     /**
19 19
      * Register any application authentication / authorization services.
20 20
      *
21
-     * @param \Illuminate\Contracts\Auth\Access\Gate $gate
22 21
      *
23 22
      * @return void
24 23
      */
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 
7 7
 class AuthServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * The policy mappings for the application.
11
-     *
12
-     * @var array
13
-     */
14
-    protected $policies = [
15
-        'App\Model' => 'App\Policies\ModelPolicy',
16
-    ];
9
+	/**
10
+	 * The policy mappings for the application.
11
+	 *
12
+	 * @var array
13
+	 */
14
+	protected $policies = [
15
+		'App\Model' => 'App\Policies\ModelPolicy',
16
+	];
17 17
 
18
-    /**
19
-     * Register any application authentication / authorization services.
20
-     *
21
-     * @param \Illuminate\Contracts\Auth\Access\Gate $gate
22
-     *
23
-     * @return void
24
-     */
25
-    public function boot()
26
-    {
27
-        $this->registerPolicies();
18
+	/**
19
+	 * Register any application authentication / authorization services.
20
+	 *
21
+	 * @param \Illuminate\Contracts\Auth\Access\Gate $gate
22
+	 *
23
+	 * @return void
24
+	 */
25
+	public function boot()
26
+	{
27
+		$this->registerPolicies();
28 28
 
29
-        //
30
-    }
29
+		//
30
+	}
31 31
 }
Please login to merge, or discard this patch.
app/Providers/EventServiceProvider.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
     /**
22 22
      * Register any other events for your application.
23 23
      *
24
-     * @param \Illuminate\Contracts\Events\Dispatcher $events
25 24
      */
26 25
     public function boot()
27 26
     {
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class EventServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * The event handler mappings for the application.
11
-     *
12
-     * @var array
13
-     */
14
-    protected $listen = [
15
-        'PiFinder\Events\ServerWasPoked' => [
16
-            'PiFinder\Handlers\Events\NotifyUsersAboutPoke',
17
-            'PiFinder\Handlers\Events\UpdateStatistics',
18
-        ],
19
-    ];
9
+	/**
10
+	 * The event handler mappings for the application.
11
+	 *
12
+	 * @var array
13
+	 */
14
+	protected $listen = [
15
+		'PiFinder\Events\ServerWasPoked' => [
16
+			'PiFinder\Handlers\Events\NotifyUsersAboutPoke',
17
+			'PiFinder\Handlers\Events\UpdateStatistics',
18
+		],
19
+	];
20 20
 
21
-    /**
22
-     * Register any other events for your application.
23
-     *
24
-     * @param \Illuminate\Contracts\Events\Dispatcher $events
25
-     */
26
-    public function boot()
27
-    {
28
-        parent::boot();
21
+	/**
22
+	 * Register any other events for your application.
23
+	 *
24
+	 * @param \Illuminate\Contracts\Events\Dispatcher $events
25
+	 */
26
+	public function boot()
27
+	{
28
+		parent::boot();
29 29
 
30
-        //
31
-    }
30
+		//
31
+	}
32 32
 }
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
     /**
20 20
      * Define your route model bindings, pattern filters, etc.
21 21
      *
22
-     * @param \Illuminate\Routing\Router $router
23 22
      */
24 23
     public function boot()
25 24
     {
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -7,36 +7,36 @@
 block discarded – undo
7 7
 
8 8
 class RouteServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * This namespace is applied to the controller routes in your routes file.
12
-     *
13
-     * In addition, it is set as the URL generator's root namespace.
14
-     *
15
-     * @var string
16
-     */
17
-    protected $namespace = 'PiFinder\Http\Controllers';
10
+	/**
11
+	 * This namespace is applied to the controller routes in your routes file.
12
+	 *
13
+	 * In addition, it is set as the URL generator's root namespace.
14
+	 *
15
+	 * @var string
16
+	 */
17
+	protected $namespace = 'PiFinder\Http\Controllers';
18 18
 
19
-    /**
20
-     * Define your route model bindings, pattern filters, etc.
21
-     *
22
-     * @param \Illuminate\Routing\Router $router
23
-     */
24
-    public function boot()
25
-    {
26
-        parent::boot();
19
+	/**
20
+	 * Define your route model bindings, pattern filters, etc.
21
+	 *
22
+	 * @param \Illuminate\Routing\Router $router
23
+	 */
24
+	public function boot()
25
+	{
26
+		parent::boot();
27 27
 
28
-        //
29
-    }
28
+		//
29
+	}
30 30
 
31
-    /**
32
-     * Define the routes for the application.
33
-     *
34
-     * @param \Illuminate\Routing\Router $router
35
-     */
36
-    public function map(Router $router)
37
-    {
38
-        $router->group(['namespace' => $this->namespace], function ($router) {
39
-            require app_path('Http/routes.php');
40
-        });
41
-    }
31
+	/**
32
+	 * Define the routes for the application.
33
+	 *
34
+	 * @param \Illuminate\Routing\Router $router
35
+	 */
36
+	public function map(Router $router)
37
+	{
38
+		$router->group(['namespace' => $this->namespace], function ($router) {
39
+			require app_path('Http/routes.php');
40
+		});
41
+	}
42 42
 }
Please login to merge, or discard this patch.
app/Providers/BroadcastServiceProvider.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@
 block discarded – undo
7 7
 
8 8
 class BroadcastServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * Bootstrap any application services.
12
-     *
13
-     * @return void
14
-     */
15
-    public function boot()
16
-    {
17
-        Broadcast::routes();
10
+	/**
11
+	 * Bootstrap any application services.
12
+	 *
13
+	 * @return void
14
+	 */
15
+	public function boot()
16
+	{
17
+		Broadcast::routes();
18 18
 
19
-        /*
19
+		/*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('App.User.{userId}', function ($user, $userId) {
23
-            return (int) $user->id === (int) $userId;
24
-        });
25
-    }
22
+		Broadcast::channel('App.User.{userId}', function ($user, $userId) {
23
+			return (int) $user->id === (int) $userId;
24
+		});
25
+	}
26 26
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         /*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('App.User.{userId}', function ($user, $userId) {
22
+        Broadcast::channel('App.User.{userId}', function($user, $userId) {
23 23
             return (int) $user->id === (int) $userId;
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -8,61 +8,61 @@
 block discarded – undo
8 8
 
9 9
 class Handler extends ExceptionHandler
10 10
 {
11
-    /**
12
-     * A list of the exception types that should not be reported.
13
-     *
14
-     * @var array
15
-     */
16
-    protected $dontReport = [
17
-        \Illuminate\Auth\AuthenticationException::class,
18
-        \Illuminate\Auth\Access\AuthorizationException::class,
19
-        \Symfony\Component\HttpKernel\Exception\HttpException::class,
20
-        \Illuminate\Database\Eloquent\ModelNotFoundException::class,
21
-        \Illuminate\Session\TokenMismatchException::class,
22
-        \Illuminate\Validation\ValidationException::class,
23
-    ];
11
+	/**
12
+	 * A list of the exception types that should not be reported.
13
+	 *
14
+	 * @var array
15
+	 */
16
+	protected $dontReport = [
17
+		\Illuminate\Auth\AuthenticationException::class,
18
+		\Illuminate\Auth\Access\AuthorizationException::class,
19
+		\Symfony\Component\HttpKernel\Exception\HttpException::class,
20
+		\Illuminate\Database\Eloquent\ModelNotFoundException::class,
21
+		\Illuminate\Session\TokenMismatchException::class,
22
+		\Illuminate\Validation\ValidationException::class,
23
+	];
24 24
 
25
-    /**
26
-     * Report or log an exception.
27
-     *
28
-     * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
29
-     *
30
-     * @param \Exception $exception
31
-     *
32
-     * @return void
33
-     */
34
-    public function report(Exception $exception)
35
-    {
36
-        parent::report($exception);
37
-    }
25
+	/**
26
+	 * Report or log an exception.
27
+	 *
28
+	 * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
29
+	 *
30
+	 * @param \Exception $exception
31
+	 *
32
+	 * @return void
33
+	 */
34
+	public function report(Exception $exception)
35
+	{
36
+		parent::report($exception);
37
+	}
38 38
 
39
-    /**
40
-     * Render an exception into an HTTP response.
41
-     *
42
-     * @param \Illuminate\Http\Request $request
43
-     * @param \Exception               $exception
44
-     *
45
-     * @return \Illuminate\Http\Response
46
-     */
47
-    public function render($request, Exception $exception)
48
-    {
49
-        return parent::render($request, $exception);
50
-    }
39
+	/**
40
+	 * Render an exception into an HTTP response.
41
+	 *
42
+	 * @param \Illuminate\Http\Request $request
43
+	 * @param \Exception               $exception
44
+	 *
45
+	 * @return \Illuminate\Http\Response
46
+	 */
47
+	public function render($request, Exception $exception)
48
+	{
49
+		return parent::render($request, $exception);
50
+	}
51 51
 
52
-    /**
53
-     * Convert an authentication exception into an unauthenticated response.
54
-     *
55
-     * @param \Illuminate\Http\Request                 $request
56
-     * @param \Illuminate\Auth\AuthenticationException $exception
57
-     *
58
-     * @return \Illuminate\Http\Response
59
-     */
60
-    protected function unauthenticated($request, AuthenticationException $exception)
61
-    {
62
-        if ($request->expectsJson()) {
63
-            return response()->json(['error' => 'Unauthenticated.'], 401);
64
-        }
52
+	/**
53
+	 * Convert an authentication exception into an unauthenticated response.
54
+	 *
55
+	 * @param \Illuminate\Http\Request                 $request
56
+	 * @param \Illuminate\Auth\AuthenticationException $exception
57
+	 *
58
+	 * @return \Illuminate\Http\Response
59
+	 */
60
+	protected function unauthenticated($request, AuthenticationException $exception)
61
+	{
62
+		if ($request->expectsJson()) {
63
+			return response()->json(['error' => 'Unauthenticated.'], 401);
64
+		}
65 65
 
66
-        return redirect()->guest('login');
67
-    }
66
+		return redirect()->guest('login');
67
+	}
68 68
 }
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 Route::get('/stats', 'WelcomeController@statistics');
8 8
 
9 9
 Route::group(['prefix' => 'api/v1', 'namespace' => 'Api'], function () {
10
-    Route::get('/devices/@{group}', 'DeviceController@index');
11
-    Route::resource('devices', 'DeviceController', ['except' => ['create', 'edit']]);
10
+	Route::get('/devices/@{group}', 'DeviceController@index');
11
+	Route::resource('devices', 'DeviceController', ['except' => ['create', 'edit']]);
12 12
 
13
-    Route::post('devices/poke', [
14
-        'as'   => 'devices.poke',
15
-        'uses' => 'DeviceController@poke',
16
-    ]);
13
+	Route::post('devices/poke', [
14
+		'as'   => 'devices.poke',
15
+		'uses' => 'DeviceController@poke',
16
+	]);
17 17
 });
18 18
 
19 19
 Route::get('/@{group}', 'GroupController@show');
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiController.php 1 patch
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -7,102 +7,102 @@
 block discarded – undo
7 7
 
8 8
 class ApiController extends Controller
9 9
 {
10
-    /**
11
-     * Default Status Code.
12
-     *
13
-     * @var int
14
-     */
15
-    protected $statusCode = 200;
10
+	/**
11
+	 * Default Status Code.
12
+	 *
13
+	 * @var int
14
+	 */
15
+	protected $statusCode = 200;
16 16
 
17
-    /**
18
-     * @return int
19
-     */
20
-    public function getStatusCode()
21
-    {
22
-        return $this->statusCode;
23
-    }
17
+	/**
18
+	 * @return int
19
+	 */
20
+	public function getStatusCode()
21
+	{
22
+		return $this->statusCode;
23
+	}
24 24
 
25
-    /**
26
-     * @param int $statusCode
27
-     *
28
-     * @return $this
29
-     */
30
-    public function setStatusCode($statusCode)
31
-    {
32
-        $this->statusCode = $statusCode;
25
+	/**
26
+	 * @param int $statusCode
27
+	 *
28
+	 * @return $this
29
+	 */
30
+	public function setStatusCode($statusCode)
31
+	{
32
+		$this->statusCode = $statusCode;
33 33
 
34
-        return $this;
35
-    }
34
+		return $this;
35
+	}
36 36
 
37
-    /**
38
-     * @param array $data
39
-     *
40
-     * @return mixed
41
-     */
42
-    public function respondCreated($data, $id)
43
-    {
44
-        $headers = [
45
-            'Location' => route('devices.show', $id),
46
-        ];
37
+	/**
38
+	 * @param array $data
39
+	 *
40
+	 * @return mixed
41
+	 */
42
+	public function respondCreated($data, $id)
43
+	{
44
+		$headers = [
45
+			'Location' => route('devices.show', $id),
46
+		];
47 47
 
48
-        return $this->setStatusCode(201)->respond(compact('data'), $headers);
49
-    }
48
+		return $this->setStatusCode(201)->respond(compact('data'), $headers);
49
+	}
50 50
 
51
-    /**
52
-     * @param array $data
53
-     *
54
-     * @return mixed
55
-     */
56
-    public function respondPoked($data, $id)
57
-    {
58
-        $headers = [
59
-            'Location' => route('devices.show', $id),
60
-        ];
51
+	/**
52
+	 * @param array $data
53
+	 *
54
+	 * @return mixed
55
+	 */
56
+	public function respondPoked($data, $id)
57
+	{
58
+		$headers = [
59
+			'Location' => route('devices.show', $id),
60
+		];
61 61
 
62
-        return $this->setStatusCode(200)->respond(compact('data'), $headers);
63
-    }
62
+		return $this->setStatusCode(200)->respond(compact('data'), $headers);
63
+	}
64 64
 
65
-    /**
66
-     * @return mixed
67
-     */
68
-    public function respondNoContent()
69
-    {
70
-        return $this->setStatusCode(204)->respond([]);
71
-    }
65
+	/**
66
+	 * @return mixed
67
+	 */
68
+	public function respondNoContent()
69
+	{
70
+		return $this->setStatusCode(204)->respond([]);
71
+	}
72 72
 
73
-    /**
74
-     * @param string $message
75
-     *
76
-     * @return mixed
77
-     */
78
-    public function respondNotFound($message = 'Did not find the resource you are looking for!')
79
-    {
80
-        return $this->setStatusCode(404)->respondWithError($message);
81
-    }
73
+	/**
74
+	 * @param string $message
75
+	 *
76
+	 * @return mixed
77
+	 */
78
+	public function respondNotFound($message = 'Did not find the resource you are looking for!')
79
+	{
80
+		return $this->setStatusCode(404)->respondWithError($message);
81
+	}
82 82
 
83
-    /**
84
-     * @param $data
85
-     * @param array $headers
86
-     *
87
-     * @return mixed
88
-     */
89
-    public function respond($data, $headers = [])
90
-    {
91
-        return Response::json($data, $this->getStatusCode(), $headers);
92
-    }
83
+	/**
84
+	 * @param $data
85
+	 * @param array $headers
86
+	 *
87
+	 * @return mixed
88
+	 */
89
+	public function respond($data, $headers = [])
90
+	{
91
+		return Response::json($data, $this->getStatusCode(), $headers);
92
+	}
93 93
 
94
-    /**
95
-     * @param $message
96
-     *
97
-     * @return mixed
98
-     */
99
-    public function respondWithError($message)
100
-    {
101
-        return $this->respond([
102
-            'errors' => [
103
-                'title'  => $message,
104
-                'status' => $this->getStatusCode(),
105
-            ],
106
-        ]);
107
-    }
94
+	/**
95
+	 * @param $message
96
+	 *
97
+	 * @return mixed
98
+	 */
99
+	public function respondWithError($message)
100
+	{
101
+		return $this->respond([
102
+			'errors' => [
103
+				'title'  => $message,
104
+				'status' => $this->getStatusCode(),
105
+			],
106
+		]);
107
+	}
108 108
 }
Please login to merge, or discard this patch.
app/Http/Kernel.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -6,51 +6,51 @@
 block discarded – undo
6 6
 
7 7
 class Kernel extends HttpKernel
8 8
 {
9
-    /**
10
-     * The application's global HTTP middleware stack.
11
-     *
12
-     * These middleware are run during every request to your application.
13
-     *
14
-     * @var array
15
-     */
16
-    protected $middleware = [
17
-        \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18
-    ];
9
+	/**
10
+	 * The application's global HTTP middleware stack.
11
+	 *
12
+	 * These middleware are run during every request to your application.
13
+	 *
14
+	 * @var array
15
+	 */
16
+	protected $middleware = [
17
+		\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18
+	];
19 19
 
20
-    /**
21
-     * The application's route middleware groups.
22
-     *
23
-     * @var array
24
-     */
25
-    protected $middlewareGroups = [
26
-        'web' => [
27
-            \PiFinder\Http\Middleware\EncryptCookies::class,
28
-            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
29
-            \Illuminate\Session\Middleware\StartSession::class,
30
-            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
31
-            \PiFinder\Http\Middleware\VerifyCsrfToken::class,
32
-            \Illuminate\Routing\Middleware\SubstituteBindings::class,
33
-        ],
20
+	/**
21
+	 * The application's route middleware groups.
22
+	 *
23
+	 * @var array
24
+	 */
25
+	protected $middlewareGroups = [
26
+		'web' => [
27
+			\PiFinder\Http\Middleware\EncryptCookies::class,
28
+			\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
29
+			\Illuminate\Session\Middleware\StartSession::class,
30
+			\Illuminate\View\Middleware\ShareErrorsFromSession::class,
31
+			\PiFinder\Http\Middleware\VerifyCsrfToken::class,
32
+			\Illuminate\Routing\Middleware\SubstituteBindings::class,
33
+		],
34 34
 
35
-        'api' => [
36
-            'throttle:60,1',
37
-            'bindings',
38
-        ],
39
-    ];
35
+		'api' => [
36
+			'throttle:60,1',
37
+			'bindings',
38
+		],
39
+	];
40 40
 
41
-    /**
42
-     * The application's route middleware.
43
-     *
44
-     * These middleware may be assigned to groups or used individually.
45
-     *
46
-     * @var array
47
-     */
48
-    protected $routeMiddleware = [
49
-        'auth'       => \Illuminate\Auth\Middleware\Authenticate::class,
50
-        'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
51
-        'bindings'   => \Illuminate\Routing\Middleware\SubstituteBindings::class,
52
-        'can'        => \Illuminate\Auth\Middleware\Authorize::class,
53
-        'guest'      => \PiFinder\Http\Middleware\RedirectIfAuthenticated::class,
54
-        'throttle'   => \Illuminate\Routing\Middleware\ThrottleRequests::class,
55
-    ];
41
+	/**
42
+	 * The application's route middleware.
43
+	 *
44
+	 * These middleware may be assigned to groups or used individually.
45
+	 *
46
+	 * @var array
47
+	 */
48
+	protected $routeMiddleware = [
49
+		'auth'       => \Illuminate\Auth\Middleware\Authenticate::class,
50
+		'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
51
+		'bindings'   => \Illuminate\Routing\Middleware\SubstituteBindings::class,
52
+		'can'        => \Illuminate\Auth\Middleware\Authorize::class,
53
+		'guest'      => \PiFinder\Http\Middleware\RedirectIfAuthenticated::class,
54
+		'throttle'   => \Illuminate\Routing\Middleware\ThrottleRequests::class,
55
+	];
56 56
 }
Please login to merge, or discard this patch.
app/User.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
7 7
 
8 8
 class User extends Authenticatable
9 9
 {
10
-    use Notifiable;
10
+	use Notifiable;
11 11
 
12
-    /**
13
-     * The attributes that are mass assignable.
14
-     *
15
-     * @var array
16
-     */
17
-    protected $fillable = [
18
-        'name', 'email', 'password',
19
-    ];
12
+	/**
13
+	 * The attributes that are mass assignable.
14
+	 *
15
+	 * @var array
16
+	 */
17
+	protected $fillable = [
18
+		'name', 'email', 'password',
19
+	];
20 20
 
21
-    /**
22
-     * The attributes that should be hidden for arrays.
23
-     *
24
-     * @var array
25
-     */
26
-    protected $hidden = [
27
-        'password', 'remember_token',
28
-    ];
21
+	/**
22
+	 * The attributes that should be hidden for arrays.
23
+	 *
24
+	 * @var array
25
+	 */
26
+	protected $hidden = [
27
+		'password', 'remember_token',
28
+	];
29 29
 }
Please login to merge, or discard this patch.