Test Setup Failed
Branch master (fcc3b8)
by Yuvaraj
02:22
created
app/controllers/VideoChatController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 class VideoChatController extends AuthController {
4 4
    
5 5
    
6
-     public function video() {
6
+        public function video() {
7 7
         if (Auth::user()) {
8 8
 
9 9
           
Please login to merge, or discard this patch.
app/controllers/profile_pic_controllers/UserProfileController.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
                 $userDetailsArray = array();
12 12
                 $userDetailsArray = $value;
13 13
             }
14
-           // print_r($userDetailsArray);
15
-             $data['userDetailsArray']=$userDetailsArray;
14
+            // print_r($userDetailsArray);
15
+                $data['userDetailsArray']=$userDetailsArray;
16 16
             return View::make('layouts/profile')->with("userDetailsArray", $userDetailsArray);
17 17
         }
18 18
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             , 'last_name' => Input::get('last_name'), 'email' => Input::get('email'), 'contact' => Input::get('contact')
44 44
                 )
45 45
         );
46
-          return Redirect::to('/view_profile/'.Auth::user()->id);
46
+            return Redirect::to('/view_profile/'.Auth::user()->id);
47 47
     }
48 48
 
49 49
     public function updateProfilePicture() {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             // Redirect with a helpful message to inform the user that 
70 70
             // the provided file was not an adequate type
71 71
 //            return Redirect::back()->withErrors(['Error: The provided file was not an image', 'Error: The provided file was not an image']);
72
-             return Redirect::back()->withErrors($validator);
72
+                return Redirect::back()->withErrors($validator);
73 73
             //print_r('Error: The provided file was not an image');
74 74
             // return Redirect::to('/')->with('message', 'Error: The provided file was not an image');
75 75
         } else {
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
         return Redirect::route('main');
98 98
     }
99 99
     
100
-     public function updatePassword() {
101
-          $input = Input::all();
102
-           $rules = array(
103
-                       'current_password' => 'required',
100
+        public function updatePassword() {
101
+            $input = Input::all();
102
+            $rules = array(
103
+                        'current_password' => 'required',
104 104
 
105
-             'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/',
105
+                'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/',
106 106
         'password_confirm' => 'required|same:password'
107 107
         );
108 108
            
@@ -111,19 +111,19 @@  discard block
 block discarded – undo
111 111
         // Check to see if validation fails or passes
112 112
         if ($validator->fails()) {
113 113
          
114
-             return Redirect::back()->withErrors($validator);
114
+                return Redirect::back()->withErrors($validator);
115 115
         } else {
116
-         $password=  Hash::make(Input::get('new_password'));
116
+            $password=  Hash::make(Input::get('new_password'));
117 117
         DB::table('users')->where('id', Auth::user()->id)->update(array(
118 118
                 'password' => $password
119 119
                     )
120 120
             );
121 121
         }
122
-          return Redirect::to('/settings/');
122
+            return Redirect::to('/settings/');
123 123
     }
124 124
     
125 125
     function deactivateAccount(){
126
-         if (Auth::user()) {            
126
+            if (Auth::user()) {            
127 127
         $loggedInUser=Auth::user()->id;
128 128
         $userProfile = DB::table('users')->select('profile_pic')->where('id', Auth::user()->id)->get();
129 129
         foreach ($userProfile as $key => $value) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $affected = DB::table('users')->where('id', '=', $loggedInUser)->delete();
140 140
 //        @unlink('fusionmate/public/plugins/userUploads/' . $userDetailsArray['profile_pic']);
141 141
             return Redirect::route('main');
142
-         }
142
+            }
143 143
                  
144 144
 
145 145
              
Please login to merge, or discard this patch.
app/controllers/auth_controllers/AuthController.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 
54 54
        
55 55
         if(Input::get('token')!=''){
56
-			 $rules = array(
57
-			'email' => 'required|email',
58
-			'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/'
59
-		);
60
-         $messages = array(
56
+                $rules = array(
57
+            'email' => 'required|email',
58
+            'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/'
59
+        );
60
+            $messages = array(
61 61
             'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.',
62 62
            
63 63
         );}
64 64
         else{
65
-			 $rules = array(
65
+                $rules = array(
66 66
             'email' => 'required|email',
67 67
             'password' => 'required'
68 68
         );
69
-          $messages = array(
69
+            $messages = array(
70 70
             'password.regex' => 'Invalid Username/Password',
71 71
            
72 72
         );   
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                     DB::table('team_channel_users')->insert(
99 99
                             ['team_channel_name_id' => $result['team_id'], 'user_id' => $id]
100 100
                     );
101
-                     //delete token from database before creating invited account
101
+                        //delete token from database before creating invited account
102 102
                     DB::table('invitation_token')->where('token', '=', $token)->delete();
103 103
                     $this->teamRepository->updateNewMemberJoinNotification($result['team_id'],$id);
104 104
                 }
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
                             ), 200);
136 136
         }
137 137
         else{
138
-             $errorMsg = array(
138
+                $errorMsg = array(
139 139
             'errormsg' => 'Invalid Email or Password'
140 140
         );
141
-             return Response::json(array(
141
+                return Response::json(array(
142 142
                 'success' => false,
143 143
                 'errors' => $errorMsg, 
144 144
                 400
Please login to merge, or discard this patch.
app/controllers/auth_controllers/RegisterController.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
4 4
 
5 5
     public function registerUser() {
6 6
         
7
-         $input = Input::only(array(
8
-             'firstName',
9
-             'lastName',
7
+            $input = Input::only(array(
8
+                'firstName',
9
+                'lastName',
10 10
             'email',
11 11
             'password',
12
-             'role'
12
+                'role'
13 13
         ));
14 14
 
15 15
          
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
             'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/',
21 21
             'role' => 'required'
22 22
         );
23
- $messages = array(
23
+    $messages = array(
24 24
             'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.',
25 25
            
26 26
         );
27 27
         $validator = Validator::make($input, $rules,$messages);
28
- $messages = $validator->messages();
28
+    $messages = $validator->messages();
29 29
         if($validator->fails()) {
30 30
           
31 31
             return Response::json(array(
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         DB::table('user_roles')->insert(
42 42
                 ['user_id' => $id, 'role_id' => Input::get('role')]
43 43
         );
44
-      $channelId=  Hash::make(Input::get('password'));
45
-       DB::table('channels')->insert(
44
+        $channelId=  Hash::make(Input::get('password'));
45
+        DB::table('channels')->insert(
46 46
                 ['channel_name' => $channelId, 'author_id' => $id]
47 47
         );
48 48
         if (Auth::attempt(array('email' => Input::get('email'), 'password' => Input::get('password')),true)) {
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
             Session::put('profilePic', Auth::user()->profile_pic);
63 63
             Session::put('role', $role['role_id']);
64 64
             Session::put('channelId', $channelName['id']);
65
-           return Response::json(array(
65
+            return Response::json(array(
66 66
                         'success' => "ok"
67 67
                             ), 200);
68 68
            
69 69
         }
70
-              return Response::json(array(
70
+                return Response::json(array(
71 71
                         'success' => "notok"
72 72
                             ), 400);
73 73
       
Please login to merge, or discard this patch.
app/controllers/notifications_controllers/NotificationController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
             $unReadMessages = DB::table('messages')
12 12
                             ->select(DB::raw('count(from_user_id) as fromCount'), 'personal_conversations.*','team_channels.id as team_id', 'messages.*', 'users_from.first_name as from_first_name', 'users_from.first_name as from_last_name')
13 13
                             ->leftJoin('personal_conversations', 'messages.id', '=', 'personal_conversations.message_id')
14
-                               ->leftJoin('team_channels', 'team_channels.id', '=', 'personal_conversations.team_channel_id')
14
+                                ->leftJoin('team_channels', 'team_channels.id', '=', 'personal_conversations.team_channel_id')
15 15
                             ->leftJoin('users as users_from', 'users_from.id', '=', 'personal_conversations.from_user_id')
16 16
                             ->where('personal_conversations.read_status', '=', 1)
17 17
                             ->where('personal_conversations.to_user_id', '=', Auth::user()->id)->groupBy('from_user_id')->orderBy('messages.id', 'desc')->get();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                             ->leftJoin('team_channels', 'team_channels.id', '=', 'invitation_notification.team_id')
39 39
                             ->leftJoin('users', 'users.id', '=', 'invitation_notification.new_user')
40 40
                             ->where('invitation_notification.team_user', '=', Auth::user()->id)
41
-                             ->where('invitation_notification.new_user', '!=', Auth::user()->id)
41
+                                ->where('invitation_notification.new_user', '!=', Auth::user()->id)
42 42
                             ->where('invitation_notification.read_status', '=', 1)
43 43
                             ->groupBy('invitation_notification.new_user')
44 44
                             ->orderBy('invitation_notification.created_at', 'desc')->get();
Please login to merge, or discard this patch.
app/controllers/Register.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 class Register extends \BaseController {
4 4
 
5 5
     public function registerUser() {
6
-         $input = Input::only(array(
7
-             'firstName',
8
-             'lastName',
6
+            $input = Input::only(array(
7
+                'firstName',
8
+                'lastName',
9 9
             'email',
10 10
             'password',
11
-             'role'
11
+                'role'
12 12
         ));
13 13
 
14 14
          
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         );
22 22
 
23 23
         $validator = Validator::make($input, $rules);
24
- $messages = $validator->messages();
24
+    $messages = $validator->messages();
25 25
         if($validator->fails()) {
26 26
           
27 27
             return Response::json(array(
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
         DB::table('user_roles')->insert(
38 38
                 ['user_id' => $id, 'role_id' => Input::get('role')]
39 39
         );
40
-      $channelId=  Hash::make(Input::get('password'));
41
-       DB::table('channels')->insert(
40
+        $channelId=  Hash::make(Input::get('password'));
41
+        DB::table('channels')->insert(
42 42
                 ['channel_name' => $channelId, 'author_id' => $id]
43 43
         );
44 44
             return View::make('templates/greeting')->with('message', "Account created successfully.You can now log in.Have a great day!");
Please login to merge, or discard this patch.
app/controllers/task_controllers/TaskController.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
                 return View::make('templates/greeting')->with('info', $result);
40 40
         }
41 41
         
42
-         /**
43
-         *  @function creates task
42
+            /**
43
+             *  @function creates task
44 44
           @param null
45 45
           @return null
46
-         */
46
+             */
47 47
         public function create_task() {
48 48
                 $result = $this->taskRepository->createTask();
49 49
                 return $result;
@@ -82,21 +82,21 @@  discard block
 block discarded – undo
82 82
                 return $result;
83 83
         }
84 84
         
85
-          /**
86
-         *  @function filter dashboard data
85
+            /**
86
+             *  @function filter dashboard data
87 87
           @param null
88 88
           @return array dashboard data
89
-         */
89
+             */
90 90
         public function filter_dashboard() {
91 91
                 $result = $this->taskRepository->filterDashboard();
92 92
                 return $result;
93 93
         }
94 94
         
95
-          /**
96
-         *  @function filter grid data
95
+            /**
96
+             *  @function filter grid data
97 97
           @param null
98 98
           @return array grid data
99
-         */
99
+             */
100 100
         public function filter_grid() {
101 101
                 $page = \Input::get('current');
102 102
                 $rowCount = \Input::get('rowCount');
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
                 $total='';
105 105
                 $result = $this->taskRepository->filterGrid();
106 106
                 foreach($result as $values){
107
-                       $rows[]=array('un_id'=>$values['un_id'],
107
+                        $rows[]=array('un_id'=>$values['un_id'],
108 108
                             'priority_name'=>$values['priority_name'],
109 109
                             'status_name'=>$values['status_name'],
110 110
                             'tracker'=>$values['tracker'],
111 111
                             'assignee'=>$values['first_name']." ".$values['last_name'],
112 112
                             'created_at'=>$values['created_at'],
113 113
                             'start_date'=>$values['start_date'],
114
-                             'end_date'=>$values['end_date']) ;
114
+                                'end_date'=>$values['end_date']) ;
115 115
                 }
116 116
                 $data=array('current'=>$page,'rowCount'=>$rowCount,'rows'=>$rows,'total'=>count($rows));
117 117
                 return json_encode($data);
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
         }
142 142
         
143 143
         
144
-          /**  @function list of previous updates on a task
144
+            /**  @function list of previous updates on a task
145 145
           @param task parent id
146 146
           @return html view
147
-         */
147
+             */
148 148
         public function get_project_teams() {
149 149
                 $result=$this->taskRepository->getProjectTeams(Input::get('projectId'));
150 150
                 $data='';
Please login to merge, or discard this patch.
app/controllers/MessageType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      */
10 10
     public function index() {
11 11
 $message='typing';
12
-       $data = array(
12
+        $data = array(
13 13
             'room'        => Input::get('conversation'),
14 14
             'message'  => array( 'body' => Str::words($message, 5), 'user_id' => '')
15 15
         );
Please login to merge, or discard this patch.
app/controllers/RemindersController.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -2,79 +2,79 @@
 block discarded – undo
2 2
 
3 3
 class RemindersController extends Controller {
4 4
 
5
-	/**
6
-	 * Display the password reminder view.
7
-	 *
8
-	 * @return Response
9
-	 */
10
-	public function getRemind()
11
-	{
12
-		return View::make('templates/password_reset/remind');
13
-	}
5
+    /**
6
+     * Display the password reminder view.
7
+     *
8
+     * @return Response
9
+     */
10
+    public function getRemind()
11
+    {
12
+        return View::make('templates/password_reset/remind');
13
+    }
14 14
 
15
-	/**
16
-	 * Handle a POST request to remind a user of their password.
17
-	 *
18
-	 * @return Response
19
-	 */
20
-	public function postRemind()
21
-	{
15
+    /**
16
+     * Handle a POST request to remind a user of their password.
17
+     *
18
+     * @return Response
19
+     */
20
+    public function postRemind()
21
+    {
22 22
                 $response = Password::remind(Input::only('email'), function($message)
23 23
                 {
24 24
                         $message->subject('Password Reset');
25 25
                 });
26 26
 
27
-		switch ($response)
28
-		{
29
-			case Password::INVALID_USER:
30
-				return Redirect::back()->withErrors(['error']);
27
+        switch ($response)
28
+        {
29
+            case Password::INVALID_USER:
30
+                return Redirect::back()->withErrors(['error']);
31 31
 
32
-			case Password::REMINDER_SENT:
33
-				return Redirect::back()->withErrors(['success']);
34
-		}
35
-	}
32
+            case Password::REMINDER_SENT:
33
+                return Redirect::back()->withErrors(['success']);
34
+        }
35
+    }
36 36
 
37
-	/**
38
-	 * Display the password reset view for the given token.
39
-	 *
40
-	 * @param  string  $token
41
-	 * @return Response
42
-	 */
43
-	public function getReset($token = null)
44
-	{
45
-		if (is_null($token)) App::abort(404);
37
+    /**
38
+     * Display the password reset view for the given token.
39
+     *
40
+     * @param  string  $token
41
+     * @return Response
42
+     */
43
+    public function getReset($token = null)
44
+    {
45
+        if (is_null($token)) App::abort(404);
46 46
 
47
-		return View::make('templates/password_reset/reset')->with('token', $token);
48
-	}
47
+        return View::make('templates/password_reset/reset')->with('token', $token);
48
+    }
49 49
 
50
-	/**
51
-	 * Handle a POST request to reset a user's password.
52
-	 *
53
-	 * @return Response
54
-	 */
55
-	public function postReset()
56
-	{
57
-		$credentials = Input::only(
58
-			'email', 'password', 'password_confirmation', 'token'
59
-		);
50
+    /**
51
+     * Handle a POST request to reset a user's password.
52
+     *
53
+     * @return Response
54
+     */
55
+    public function postReset()
56
+    {
57
+        $credentials = Input::only(
58
+            'email', 'password', 'password_confirmation', 'token'
59
+        );
60 60
 
61
-		$response = Password::reset($credentials, function($user, $password)
62
-		{
63
-			$user->password = Hash::make($password);
61
+        $response = Password::reset($credentials, function($user, $password)
62
+        {
63
+            $user->password = Hash::make($password);
64 64
 
65
-			$user->save();
66
-		});
65
+            $user->save();
66
+        });
67 67
 
68
-		switch ($response)
69
-		{
70
-			case Password::INVALID_PASSWORD:
71
-			case Password::INVALID_TOKEN:
72
-			case Password::INVALID_USER:
73
-				return Redirect::back()->withErrors(Lang::get($response) );
68
+        switch ($response)
69
+        {
70
+            case Password::INVALID_PASSWORD:
71
+            case Password::INVALID_TOKEN:
72
+            case Password::INVALID_USER:
73
+                return Redirect::back()->withErrors(Lang::get($response) );
74 74
 
75
-			case Password::PASSWORD_RESET:
76
-				return Redirect::back()->withErrors("Password has been reset! <a class='btn btn-default' href='/'>Click here to login</a>");
77
-		}
78
-	}
75
+            case Password::PASSWORD_RESET:
76
+                return Redirect::back()->withErrors("Password has been reset! <a class='btn btn-default' href='/'>Click here to login</a>");
77
+        }
78
+    }
79 79
 
80 80
 }
Please login to merge, or discard this patch.