Skip to content
This repository was archived by the owner on Mar 24, 2024. It is now read-only.

Commit 3327180

Browse files
committed
minor CS tweaks
1 parent 988f9eb commit 3327180

11 files changed

+262
-266
lines changed

app/Http/Controllers/AboutController.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,21 @@
44

55
class AboutController extends Controller
66
{
7-
87
/**
9-
* Constructor
10-
*
11-
* @return void
8+
* Constructor.
129
*/
1310
public function __construct()
1411
{
1512
parent::__construct();
1613
}
1714

1815
/**
19-
* index
16+
* Index.
2017
*
21-
* @return Response
18+
* @return \Illuminate\Http\Response
2219
*/
2320
public function index()
2421
{
2522
return view('about.index');
2623
}
27-
2824
}

app/Http/Controllers/AuthController.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
namespace SQLgreyGUI\Http\Controllers;
44

55
use Illuminate\Http\Request;
6+
use Auth;
67

78
class AuthController extends Controller
89
{
9-
1010
/**
11-
* show login form
11+
* Show login form.
1212
*
13-
* @return Response
13+
* @return \Illuminate\Http\Response
1414
*/
1515
public function showLogin()
1616
{
1717
return view('auth.login');
1818
}
1919

2020
/**
21-
* login
22-
*
23-
* @return Response
21+
* Login.
22+
*
23+
* @return \Illuminate\Http\Response
2424
*/
2525
public function login(Request $req)
2626
{
@@ -36,35 +36,35 @@ public function login(Request $req)
3636
$this->validate($req, $rules);
3737

3838
// Try to log the user in.
39-
if (\Auth::attempt([
40-
'username' => $req->input('username'),
41-
'password' => $req->input('password'),
42-
'enabled' => 1,
43-
], $remember)) {
39+
if (Auth::attempt([
40+
'username' => $req->input('username'),
41+
'password' => $req->input('password'),
42+
'enabled' => 1,
43+
], $remember)
44+
) {
4445

4546
// Redirect to dashboard
46-
return \Redirect::intended('/')
47-
->withSuccess('You have logged in successfully');
47+
return redirect()->intended('/')
48+
->withSuccess('You have logged in successfully');
4849
}
4950

5051
// Redirect to the login page
5152
return redirect(action('AuthController@showLogin'))
52-
->withErrors(['general' => 'Username/ Password invalid'])
53-
->withInput($req->except('password'));
53+
->withErrors(['general' => 'Username/ Password invalid'])
54+
->withInput($req->except('password'));
5455
}
5556

5657
/**
57-
* logout
58+
* logout.
5859
*
5960
* @return Response
6061
*/
6162
public function logout()
6263
{
63-
\Auth::logout();
64+
Auth::logout();
6465

6566
// Redirect to homepage
6667
return redirect('/')
67-
->withSuccess('You are logged out');
68+
->withSuccess('You are logged out');
6869
}
69-
7070
}

app/Http/Controllers/Controller.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
use Illuminate\Foundation\Validation\ValidatesRequests;
88
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
99
use Auth;
10+
use Request;
1011

1112
abstract class Controller extends BaseController
1213
{
1314
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
1415

1516
/**
16-
* the user id.
17+
* The user id.
1718
*
1819
* @var int
1920
*/
@@ -42,13 +43,13 @@ public function __construct()
4243
}
4344

4445
/**
45-
* parse provided entries.
46+
* Parse provided entries.
4647
*
4748
* @return array
4849
*/
4950
protected function parseEntries($input_identifier, $repository)
5051
{
51-
$items_tmp = \Request::input($input_identifier, array());
52+
$items_tmp = Request::input($input_identifier, array());
5253

5354
$items = array();
5455

@@ -64,7 +65,7 @@ protected function parseEntries($input_identifier, $repository)
6465
}
6566

6667
/**
67-
* get name of the current controller.
68+
* Get name of the current controller.
6869
*
6970
* @return string
7071
*/
@@ -76,7 +77,7 @@ protected function getController()
7677
}
7778

7879
/**
79-
* get action.
80+
* Get action.
8081
*
8182
* @param string $action
8283
*
@@ -88,12 +89,12 @@ public function getAction($action)
8889
}
8990

9091
/**
91-
* is ajax request.
92+
* Is ajax request?
9293
*
9394
* @return bool
9495
*/
9596
protected function isAjax()
9697
{
97-
return \Request::ajax();
98+
return Request::ajax();
9899
}
99100
}

app/Http/Controllers/DashboardController.php

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,85 @@
22

33
namespace SQLgreyGUI\Http\Controllers;
44

5-
use SQLgreyGUI\Repositories\GreylistRepositoryInterface as Greylist,
6-
SQLgreyGUI\Repositories\AwlEmailRepositoryInterface as AwlEmail,
7-
SQLgreyGUI\Repositories\AwlDomainRepositoryInterface as AwlDomain,
8-
SQLgreyGUI\Repositories\OptOutEmailRepositoryInterface as OptOutEmail,
9-
SQLgreyGUI\Repositories\OptOutDomainRepositoryInterface as OptOutDomain,
10-
SQLgreyGUI\Repositories\OptInEmailRepositoryInterface as OptInEmail,
11-
SQLgreyGUI\Repositories\OptInDomainRepositoryInterface as OptInDomain;
5+
use SQLgreyGUI\Repositories\GreylistRepositoryInterface as Greylist;
6+
use SQLgreyGUI\Repositories\AwlEmailRepositoryInterface as AwlEmail;
7+
use SQLgreyGUI\Repositories\AwlDomainRepositoryInterface as AwlDomain;
8+
use SQLgreyGUI\Repositories\OptOutEmailRepositoryInterface as OptOutEmail;
9+
use SQLgreyGUI\Repositories\OptOutDomainRepositoryInterface as OptOutDomain;
10+
use SQLgreyGUI\Repositories\OptInEmailRepositoryInterface as OptInEmail;
11+
use SQLgreyGUI\Repositories\OptInDomainRepositoryInterface as OptInDomain;
1212

1313
class DashboardController extends Controller
1414
{
15-
1615
/**
17-
* Repository
18-
*
16+
* Repository.
17+
*
1918
* @var Greylist
2019
*/
2120
private $greylist;
2221

2322
/**
24-
* Repository
25-
*
23+
* Repository.
24+
*
2625
* @var AwlEmail
2726
*/
2827
private $awl_email;
2928

3029
/**
31-
* Repository
32-
*
30+
* Repository.
31+
*
3332
* @var AwlDomain
3433
*/
3534
private $awl_domain;
3635

3736
/**
38-
* Repository
39-
*
37+
* Repository.
38+
*
4039
* @var OptOutEmail
4140
*/
4241
private $optout_email;
4342

4443
/**
45-
* Repository
46-
*
44+
* Repository.
45+
*
4746
* @var OptOutDomain
4847
*/
4948
private $optout_domain;
5049

5150
/**
52-
* Repository
53-
*
51+
* Repository.
52+
*
5453
* @var OptInEmail
5554
*/
5655
private $optin_email;
5756

5857
/**
59-
* Repository
60-
*
58+
* Repository.
59+
*
6160
* @var OptInDomain
6261
*/
6362
private $optin_domain;
6463

6564
/**
66-
* Constructor
67-
*
68-
* @param Greylist $greylist
69-
* @param AwlEmail $awl_email
70-
* @param AwlDomain $awl_domain
71-
* @param OptOutEmail $optput_email
65+
* Constructor.
66+
*
67+
* @param Greylist $greylist
68+
* @param AwlEmail $awl_email
69+
* @param AwlDomain $awl_domain
70+
* @param OptOutEmail $optput_email
7271
* @param OptOutDomain $optout_domain
73-
* @param OptInEmail $optin_email
74-
* @param OptInDomain $optin_domain
72+
* @param OptInEmail $optin_email
73+
* @param OptInDomain $optin_domain
7574
*/
76-
public function __construct(Greylist $greylist, AwlEmail $awl_email, AwlDomain $awl_domain, OptOutEmail $optput_email, OptOutDomain $optout_domain, OptInEmail $optin_email, OptInDomain $optin_domain)
77-
{
75+
public function __construct(
76+
Greylist $greylist,
77+
AwlEmail $awl_email,
78+
AwlDomain $awl_domain,
79+
OptOutEmail $optput_email,
80+
OptOutDomain $optout_domain,
81+
OptInEmail $optin_email,
82+
OptInDomain $optin_domain
83+
) {
7884
parent::__construct();
7985

8086
$this->greylist = $greylist;
@@ -87,9 +93,9 @@ public function __construct(Greylist $greylist, AwlEmail $awl_email, AwlDomain $
8793
}
8894

8995
/**
90-
* index
96+
* Index.
9197
*
92-
* @return Response
98+
* @return \Illuminate\Http\Response
9399
*/
94100
public function index()
95101
{
@@ -104,7 +110,6 @@ public function index()
104110
];
105111

106112
return view('dashboard.index')
107-
->with('dashboard', $dashboard_data);
113+
->with('dashboard', $dashboard_data);
108114
}
109-
110115
}

0 commit comments

Comments
 (0)