Completed
Push — master ( 194c5e...4e03e8 )
by giu
03:01
created
src/Controller/TicketsController.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function index()
22 22
     {
23 23
         
24
-		$tickets = $this->paginate($this->Tickets->find('all', ['contain'=>['Tickettypes', 'Ticketstatuses']]));
24
+        $tickets = $this->paginate($this->Tickets->find('all', ['contain'=>['Tickettypes', 'Ticketstatuses']]));
25 25
 
26 26
         $this->set(compact('tickets'));
27 27
         $this->set('_serialize', ['tickets']);
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
             }
62 62
             $this->Flash->error(__('The ticket could not be saved. Please, try again.'));
63 63
         }
64
-		$types = $this->Tickets->Tickettypes->find('list');
65
-		$statuses = $this->Tickets->Ticketstatuses->find('list');
64
+        $types = $this->Tickets->Tickettypes->find('list');
65
+        $statuses = $this->Tickets->Ticketstatuses->find('list');
66 66
         $this->set(compact('ticket', 'types', 'statuses'));
67 67
         $this->set('_serialize', ['ticket']);
68 68
     }
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
             }
89 89
             $this->Flash->error(__('The ticket could not be saved. Please, try again.'));
90 90
         }
91
-		$tickettypes = $this->Tickets->Tickettypes->find('list');
92
-		$ticketstatuses = $this->Tickets->Ticketstatuses->find('list');
91
+        $tickettypes = $this->Tickets->Tickettypes->find('list');
92
+        $ticketstatuses = $this->Tickets->Ticketstatuses->find('list');
93 93
         $this->set(compact('ticket', 'tickettypes', 'ticketstatuses'));
94 94
         $this->set('_serialize', ['ticket']);
95 95
     }
@@ -114,23 +114,23 @@  discard block
 block discarded – undo
114 114
         return $this->redirect(['action' => 'index']);
115 115
     }
116 116
 	
117
-	public function addOperation($id = null) {
118
-		$ticket = $this->Tickets->get($id, [
117
+    public function addOperation($id = null) {
118
+        $ticket = $this->Tickets->get($id, [
119 119
             'contain' => []
120 120
         ]);
121 121
 		
122
-		$this->loadModel('Operations');
123
-		$newOperation = $this->Operations->newEntity();
124
-		if ($this->request->is('post')) {
125
-			debug($newOperation);
122
+        $this->loadModel('Operations');
123
+        $newOperation = $this->Operations->newEntity();
124
+        if ($this->request->is('post')) {
125
+            debug($newOperation);
126 126
             //$newOperation = $this->Operations->patchEntity($newOperation, $this->request->data);
127
-			$start = Time::parseDateTime($this->request->data['start']);
128
-			$end = Time::parseDateTime($this->request->data['end']);
129
-			$newOperation->ticket_id = $this->request->data['ticket_id'];
130
-			$newOperation->description = $this->request->data['description'];
131
-			$newOperation->start = $start;
132
-			$newOperation->end = $end;
133
-			debug($newOperation);
127
+            $start = Time::parseDateTime($this->request->data['start']);
128
+            $end = Time::parseDateTime($this->request->data['end']);
129
+            $newOperation->ticket_id = $this->request->data['ticket_id'];
130
+            $newOperation->description = $this->request->data['description'];
131
+            $newOperation->start = $start;
132
+            $newOperation->end = $end;
133
+            debug($newOperation);
134 134
             if ($this->Operations->save($newOperation)) {
135 135
                 $this->Flash->success(__('The new operation has been saved.'));
136 136
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             }
139 139
             $this->Flash->error(__('The new operation could not be saved. Please, try again.'));
140 140
         }
141
-		$newOperation->ticket_id = $id;
142
-		$this->set('newOperation', $newOperation);
143
-	}
141
+        $newOperation->ticket_id = $id;
142
+        $this->set('newOperation', $newOperation);
143
+    }
144 144
 }
Please login to merge, or discard this patch.