Completed
Pull Request — master (#22)
by
unknown
01:16
created
src/controller/ApiManagerController.php 2 patches
Unused Use Statements   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,10 +13,11 @@
 block discarded – undo
13 13
 use App\ApiKeys;
14 14
 use Bantenprov\Workflow\Models\WorkflowModel;
15 15
 use Bantenprov\Workflow\Models\WorkflowState;
16
-use Bantenprov\Workflow\Models\WorkflowTransition;
17 16
 use Bantenprov\Workflow\Models\History;
18 17
 use That0n3guy\Transliteration;
19
-use Validator, Session, Redirect;
18
+use Validator;
19
+use Session;
20
+use Redirect;
20 21
 
21 22
 class ApiManagerController extends Controller
22 23
 {
Please login to merge, or discard this patch.
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -125,12 +125,18 @@  discard block
 block discarded – undo
125 125
 		    return $randomString;
126 126
     }
127 127
 
128
+    /**
129
+     * @param string $model
130
+     */
128 131
     private function getWorkflow($model){
129 132
 			//$data = WorkflowModel::where('content_type', 'like', '%' . $model . '%')->get();
130 133
 			$data = WorkflowModel::where('content_type', 'like', '%' . $model . '%');
131 134
       return $data;
132 135
     }
133 136
 
137
+    /**
138
+     * @param string $state
139
+     */
134 140
     private function getState($state){
135 141
       $name = \Transliteration::clean_filename(strtolower($state));
136 142
 			//$data = WorkflowState::where('status', 1)->where('name', 'like', '%' . $name . '%')->get();
@@ -138,6 +144,9 @@  discard block
 block discarded – undo
138 144
       return $data;
139 145
     }
140 146
 
147
+    /**
148
+     * @param ApiKeys $api
149
+     */
141 150
     private function saveHistory($api, $workflow, $statesFrom, $statesTo){
142 151
     	$history = New History;
143 152
     	$history->content_id 			= $api->id;
Please login to merge, or discard this patch.