Completed
Push — master ( f3c73f...660e59 )
by Glenn
03:41 queued 01:27
created
app/Http/Controllers/AssetsController.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,27 +8,27 @@
 block discarded – undo
8 8
 
9 9
 class AssetsController extends Controller
10 10
 {
11
-  /**
12
-   * AssetsController constructor.
13
-   */
14
-  public function __construct()
15
-  {
16
-      $this->middleware('auth');
17
-      $this->middleware('lang');
18
-  }
11
+    /**
12
+     * AssetsController constructor.
13
+     */
14
+    public function __construct()
15
+    {
16
+        $this->middleware('auth');
17
+        $this->middleware('lang');
18
+    }
19 19
 
20
-  public function index()
21
-  {
20
+    public function index()
21
+    {
22 22
     return view('assets.index');
23
-  }
23
+    }
24 24
 
25
-  public function edit()
26
-  {
25
+    public function edit()
26
+    {
27 27
     return view('assets.edit');
28
-  }
28
+    }
29 29
 
30
-  public function remove()
31
-  {
30
+    public function remove()
31
+    {
32 32
     
33
-  }
33
+    }
34 34
 }
Please login to merge, or discard this patch.
app/Http/Controllers/SegmentsController.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -8,29 +8,29 @@
 block discarded – undo
8 8
 
9 9
 class SegmentsController extends Controller
10 10
 {
11
-  public function __construct()
12
-  {
13
-      $this->middleware('auth');
14
-      $this->middleware('lang');
15
-  }
16
-
17
-  public function index()
18
-  {
11
+    public function __construct()
12
+    {
13
+        $this->middleware('auth');
14
+        $this->middleware('lang');
15
+    }
16
+
17
+    public function index()
18
+    {
19 19
     return view('segments.index');
20
-  }
20
+    }
21 21
 
22
-  public function store()
23
-  {
22
+    public function store()
23
+    {
24 24
     return view('segments.register');
25
-  }
25
+    }
26 26
 
27
-  public function edit()
28
-  {
27
+    public function edit()
28
+    {
29 29
     return view('segments.edit');
30
-  }
30
+    }
31 31
 
32
-  public function update()
33
-  {
32
+    public function update()
33
+    {
34 34
 
35
-  }
35
+    }
36 36
 }
Please login to merge, or discard this patch.
app/Http/Controllers/WelcomeController.php 4 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function index()
29 29
     {
30
-        $data["department"] = Departments::all();
31
-        $data["agents"] = User::all();
30
+        $data[ "department" ] = Departments::all();
31
+        $data[ "agents" ] = User::all();
32 32
         return view('welcome', $data);
33 33
     }
34 34
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function signup()
41 41
     {
42
-      $data["segments"] = Segments::all();
43
-      $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
42
+      $data[ "segments" ] = Segments::all();
43
+      $data[ 'category' ] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
44 44
 
45 45
       return view('auth.register', $data);
46 46
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     /**
51 51
      * Save the customer.
52 52
      *
53
-     * @return \Illuminate\Http\Response
53
+     * @return \Illuminate\Http\RedirectResponse
54 54
      */
55 55
     public function registerCustomer(Request $request)
56 56
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Http\Request;
6 6
 
7
-use App\Http\Requests;
8
-
9 7
 class DepartmentController extends Controller
10 8
 {
11 9
     /**
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function signup()
43 43
     {
44
-      $data["segments"] = Segments::all();
45
-      $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
44
+        $data["segments"] = Segments::all();
45
+        $data['category'] = ProductsCategories::with('products')->paginate(10)->sortBy("name")->all();
46 46
 
47
-      return view('auth.register', $data);
47
+        return view('auth.register', $data);
48 48
     }
49 49
 
50 50
     /**
@@ -54,23 +54,23 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function registerCustomer(Request $request)
56 56
     {
57
-      $customer = new Customer;
58
-      $customer->fname   = $request->fname;
59
-      $customer->name    = $request->name;
60
-      $customer->address = $request->address;
61
-      $customer->zipcode = $request->zipcode;
62
-      $customer->city    = $request->city;
63
-      $customer->country = $request->country;
64
-      $customer->email   = $request->email;
65
-      $customer->phone   = $request->phone;
66
-      $customer->mobile  = $request->mobile;
67
-      $customer->status  = 'new';
57
+        $customer = new Customer;
58
+        $customer->fname   = $request->fname;
59
+        $customer->name    = $request->name;
60
+        $customer->address = $request->address;
61
+        $customer->zipcode = $request->zipcode;
62
+        $customer->city    = $request->city;
63
+        $customer->country = $request->country;
64
+        $customer->email   = $request->email;
65
+        $customer->phone   = $request->phone;
66
+        $customer->mobile  = $request->mobile;
67
+        $customer->status  = 'new';
68 68
 
69
-      $customer->save();
69
+        $customer->save();
70 70
 
71
-      session()->flash('message', trans('customers.registered'));
71
+        session()->flash('message', trans('customers.registered'));
72 72
 
73
-      return redirect()->to('/');
73
+        return redirect()->to('/');
74 74
     }
75 75
 
76 76
 
Please login to merge, or discard this patch.
app/Http/Controllers/CallbackController.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Http\Request;
6 6
 
7
-use App\Http\Requests;
8
-
9 7
 class DepartmentController extends Controller
10 8
 {
11 9
     /**
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $data['callback'] = Callback::with('users', 'customers', 'departments')->get();
37 37
         $data['users'] = User::all();
38
-    	return view('callbacks/list', $data);
38
+        return view('callbacks/list', $data);
39 39
     }
40 40
 
41 41
 
@@ -64,31 +64,31 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $user = auth()->user();
66 66
 
67
-      //  Callback::create($input->except('_token', 'product', 'description'));
68
-      $faker = \Faker\Factory::create();
69
-      $Callback = new Callback;
67
+        //  Callback::create($input->except('_token', 'product', 'description'));
68
+        $faker = \Faker\Factory::create();
69
+        $Callback = new Callback;
70 70
 
71
-      $Callback->type = $faker->numberBetween($min = 1, $max = 3);
72
-      $Callback->customer = $faker->numberBetween($min = 1, $max = 9);
73
-      $Callback->agent_id = '1';
74
-      $Callback->description = $request->description;
75
-      $Callback->status = 'Open';
71
+        $Callback->type = $faker->numberBetween($min = 1, $max = 3);
72
+        $Callback->customer = $faker->numberBetween($min = 1, $max = 9);
73
+        $Callback->agent_id = '1';
74
+        $Callback->description = $request->description;
75
+        $Callback->status = 'Open';
76 76
 
77
-      $Callback->save();
77
+        $Callback->save();
78 78
 
79
-      // Send confirmation email to the customer.
79
+        // Send confirmation email to the customer.
80 80
         Mail::send('emails.request', ['user' => $user, 'callback' => $Callback], function ($m) use ($user) {
81
-           $m->from('[email protected]', 'Ring Me');
81
+            $m->from('[email protected]', 'Ring Me');
82 82
 
83
-           $m->to($user->email, $user->fname)->subject('Call back requested');
84
-       });
83
+            $m->to($user->email, $user->fname)->subject('Call back requested');
84
+        });
85 85
 
86
-     // Send request email to the agent.
87
-       Mail::send('emails.request', ['user' => $user, 'callback' => $Callback], function ($m) use ($user) {
88
-          $m->from('[email protected]', 'Ring Me');
86
+        // Send request email to the agent.
87
+        Mail::send('emails.request', ['user' => $user, 'callback' => $Callback], function ($m) use ($user) {
88
+            $m->from('[email protected]', 'Ring Me');
89 89
 
90
-          $m->to("[email protected]")->subject('Call back request!');
91
-      });
90
+            $m->to("[email protected]")->subject('Call back request!');
91
+        });
92 92
         return back();
93 93
     }
94 94
 
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 
123 123
         if (! $user->is('Agent') || ! $user->is('Manager') || ! $user->is('Administrator')) {
124 124
 
125
-          $callback = Callback::find($id);
126
-          $callback->delete();
127
-          return redirect('callbacks');
125
+            $callback = Callback::find($id);
126
+            $callback->delete();
127
+            return redirect('callbacks');
128 128
         }
129 129
 
130 130
         return redirect()->back(302);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function index()
35 35
     {
36
-        $data['callback'] = Callback::with('users', 'customers', 'departments')->get();
37
-        $data['users'] = User::all();
36
+        $data[ 'callback' ] = Callback::with('users', 'customers', 'departments')->get();
37
+        $data[ 'users' ] = User::all();
38 38
     	return view('callbacks/list', $data);
39 39
     }
40 40
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $user = auth()->user();
50 50
 
51
-        if (! $user->is('Agent') || ! $user->is('Manager') || ! $user->is('Administrator')) {
51
+        if (!$user->is('Agent') || !$user->is('Manager') || !$user->is('Administrator')) {
52 52
             return redirect()->back();
53 53
         }
54 54
 
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
       $Callback->save();
78 78
 
79 79
       // Send confirmation email to the customer.
80
-        Mail::send('emails.request', ['user' => $user, 'callback' => $Callback], function ($m) use ($user) {
80
+        Mail::send('emails.request', [ 'user' => $user, 'callback' => $Callback ], function($m) use ($user) {
81 81
            $m->from('[email protected]', 'Ring Me');
82 82
 
83 83
            $m->to($user->email, $user->fname)->subject('Call back requested');
84 84
        });
85 85
 
86 86
      // Send request email to the agent.
87
-       Mail::send('emails.request', ['user' => $user, 'callback' => $Callback], function ($m) use ($user) {
87
+       Mail::send('emails.request', [ 'user' => $user, 'callback' => $Callback ], function($m) use ($user) {
88 88
           $m->from('[email protected]', 'Ring Me');
89 89
 
90 90
           $m->to("[email protected]")->subject('Call back request!');
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public function edit($id)
102 102
     {
103 103
         $user = auth()->user();
104
-        $data['item'] = Callback::find($id);
104
+        $data[ 'item' ] = Callback::find($id);
105 105
 
106 106
         if ($user->is('Agent') || $user->is('Manager') || $user->is('Administrator')) {
107 107
             return view('callbacks/details', $data);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $user = auth()->user();
122 122
 
123
-        if (! $user->is('Agent') || ! $user->is('Manager') || ! $user->is('Administrator')) {
123
+        if (!$user->is('Agent') || !$user->is('Manager') || !$user->is('Administrator')) {
124 124
 
125 125
           $callback = Callback::find($id);
126 126
           $callback->delete();
Please login to merge, or discard this patch.
app/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,5 +19,5 @@
 block discarded – undo
19 19
      *
20 20
      * @var array
21 21
      */
22
-    protected $fillable = ['name'];
22
+    protected $fillable = [ 'name' ];
23 23
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 
47 47
     protected function authenticated()
48 48
     {
49
-      $user = auth()->user();
49
+        $user = auth()->user();
50 50
 
51 51
             if(Bouncer::is($user)->a('Administrator', 'Manager')) {
52 52
                 return redirect()->route('dashboard.administration');
53 53
             }
54 54
 
55 55
             elseif(Bouncer::is($user)->an('Agents')) {
56
-              return redirect()->route('dashboard.agent');
56
+                return redirect()->route('dashboard.agent');
57 57
             }
58 58
 
59 59
             elseif(Bouncer::is($user)->an('Customer')) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             }
62 62
 
63 63
             return redirect('/');
64
-     }
64
+        }
65 65
 
66 66
     /**
67 67
      * Get a validator for an incoming registration request.
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function __construct()
40 40
     {
41
-        $this->middleware($this->guestMiddleware(), ['except' => 'logout']);
41
+        $this->middleware($this->guestMiddleware(), [ 'except' => 'logout' ]);
42 42
         $this->middleware('lang');
43 43
 
44 44
     }
@@ -48,15 +48,15 @@  discard block
 block discarded – undo
48 48
     {
49 49
       $user = auth()->user();
50 50
 
51
-            if(Bouncer::is($user)->a('Administrator', 'Manager')) {
51
+            if (Bouncer::is($user)->a('Administrator', 'Manager')) {
52 52
                 return redirect()->route('dashboard.administration');
53 53
             }
54 54
 
55
-            elseif(Bouncer::is($user)->an('Agents')) {
55
+            elseif (Bouncer::is($user)->an('Agents')) {
56 56
               return redirect()->route('dashboard.agent');
57 57
             }
58 58
 
59
-            elseif(Bouncer::is($user)->an('Customer')) {
59
+            elseif (Bouncer::is($user)->an('Customer')) {
60 60
                 return redirect('/');
61 61
             }
62 62
 
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
     protected function create(array $data)
89 89
     {
90 90
         $newUser = User::create([
91
-            'fname' => $data['fname'],
92
-            'name' => $data['name'],
93
-            'email' => $data['email'],
94
-            'password' => bcrypt($data['password']),
91
+            'fname' => $data[ 'fname' ],
92
+            'name' => $data[ 'name' ],
93
+            'email' => $data[ 'email' ],
94
+            'password' => bcrypt($data[ 'password' ]),
95 95
         ]);
96 96
 
97 97
         Bouncer::assign('Guest')->to($newUser);
Please login to merge, or discard this patch.
Braces   +2 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,13 +50,9 @@
 block discarded – undo
50 50
 
51 51
             if(Bouncer::is($user)->a('Administrator', 'Manager')) {
52 52
                 return redirect()->route('dashboard.administration');
53
-            }
54
-
55
-            elseif(Bouncer::is($user)->an('Agents')) {
53
+            } elseif(Bouncer::is($user)->an('Agents')) {
56 54
               return redirect()->route('dashboard.agent');
57
-            }
58
-
59
-            elseif(Bouncer::is($user)->an('Customer')) {
55
+            } elseif(Bouncer::is($user)->an('Customer')) {
60 56
                 return redirect('/');
61 57
             }
62 58
 
Please login to merge, or discard this patch.