Completed
Push — master ( 69384d...78d29d )
by giu
03:04
created
config/bootstrap.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
  */
91 91
 $file = new File('config/app_local.php', false);
92 92
 if($file->exists()) {
93
-	Configure::load('app_local', 'default');
93
+    Configure::load('app_local', 'default');
94 94
 }
95 95
 $file->close();
96 96
 /*
Please login to merge, or discard this patch.
src/Model/Table/TickettypesTable.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
         $this->addBehavior('Timestamp');
40 40
 		
41
-		$this->hasMany('Tickets', [
41
+        $this->hasMany('Tickets', [
42 42
             'foreignKey' => 'tickettype_id'
43 43
         ]);
44 44
 		
Please login to merge, or discard this patch.
src/Model/Table/TicketsTable.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
         $this->hasMany('Operations', [
44 44
             'foreignKey' => 'ticket_id'
45 45
         ]);
46
-		$this->belongsTo('Tickettypes', [
46
+        $this->belongsTo('Tickettypes', [
47 47
             'foreignKey' => 'tickettype_id'
48 48
         ]);
49
-		$this->belongsTo('Ticketstatuses', [
49
+        $this->belongsTo('Ticketstatuses', [
50 50
             'foreignKey' => 'ticketstatus_id'
51 51
         ]);
52 52
     }
Please login to merge, or discard this patch.
src/Model/Entity/User.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         'password'
40 40
     ];
41 41
 	
42
-	protected function _setPassword($password)
42
+    protected function _setPassword($password)
43 43
     {
44 44
         return (new DefaultPasswordHasher)->hash($password);
45 45
     }
Please login to merge, or discard this patch.
src/Controller/TickettypesController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         $tickettypes = $this->paginate($this->Tickettypes);
22 22
 		
23
-		$title = "Type of ticket";
23
+        $title = "Type of ticket";
24 24
 
25 25
         $this->set(compact(['tickettypes', 'title']));
26 26
         $this->set('_serialize', ['tickettypes']);
Please login to merge, or discard this patch.
src/Controller/UsersController.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     }
20 20
 	
21 21
 	
22
-	/**
22
+    /**
23 23
      * Index method
24 24
      *
25 25
      * @return \Cake\Network\Response|null
@@ -115,19 +115,19 @@  discard block
 block discarded – undo
115 115
         return $this->redirect(['action' => 'index']);
116 116
     }
117 117
 	
118
-	public function login() {
119
-		if ($this->request->is('post')) {
118
+    public function login() {
119
+        if ($this->request->is('post')) {
120 120
             $user = $this->Auth->identify();
121
-			$this->set('lu', $user);
121
+            $this->set('lu', $user);
122 122
             if ($user) {
123 123
                 $this->Auth->setUser($user);
124 124
                 return $this->redirect($this->Auth->redirectUrl());
125 125
             }
126 126
             $this->Flash->error(__('Invalid username or password, try again'));
127 127
         }
128
-	}
129
-	public function logout() 
130
-	{
131
-		return $this->redirect($this->Auth->logout());
132
-	}
128
+    }
129
+    public function logout() 
130
+    {
131
+        return $this->redirect($this->Auth->logout());
132
+    }
133 133
 }
Please login to merge, or discard this patch.
src/Controller/AppController.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $this->loadComponent('Flash');
46 46
         $this->loadComponent('Security');
47 47
         $this->loadComponent('Csrf');
48
-		$this->loadComponent('Auth', [
49
-			'authorize' => ['Controller'],
48
+        $this->loadComponent('Auth', [
49
+            'authorize' => ['Controller'],
50 50
             'authenticate' => [
51 51
                 'Form' => [
52 52
                     'fields' => [
@@ -59,25 +59,25 @@  discard block
 block discarded – undo
59 59
                 'controller' => 'Users',
60 60
                 'action' => 'login'
61 61
             ],
62
-			'logoutAction' => [
62
+            'logoutAction' => [
63 63
                 'controller' => 'Users',
64 64
                 'action' => 'login'
65 65
             ],
66
-			'unauthorizedRedirect' => $this->referer()
67
-		]);
68
-		$this->Auth->deny();
66
+            'unauthorizedRedirect' => $this->referer()
67
+        ]);
68
+        $this->Auth->deny();
69 69
     }
70 70
 
71
-	public function isAuthorized($user)
72
-	{
73
-		// Admin can access every action
74
-		if (isset($user['role']) && $user['role'] === 'admin') {
75
-			return true;
76
-		}
71
+    public function isAuthorized($user)
72
+    {
73
+        // Admin can access every action
74
+        if (isset($user['role']) && $user['role'] === 'admin') {
75
+            return true;
76
+        }
77 77
 
78
-		// Default permit
79
-		return true;
80
-	}
78
+        // Default permit
79
+        return true;
80
+    }
81 81
 	
82 82
 	
83 83
     /**
Please login to merge, or discard this patch.