Completed
Push — feature/api ( 725c17 )
by Laurent
02:31 queued 42s
created
class/api_flightlog.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,17 +42,17 @@
 block discarded – undo
42 42
      */
43 43
     public function get($id)
44 44
     {
45
-        if(! DolibarrApiAccess::$user->rights->propal->lire) {
45
+        if (!DolibarrApiAccess::$user->rights->propal->lire) {
46 46
             throw new RestException(401);
47 47
         }
48 48
 
49 49
         $result = $this->flight->fetch($id);
50
-        if( ! $result ) {
50
+        if (!$result) {
51 51
             throw new RestException(404, 'Flight not found');
52 52
         }
53 53
 
54
-        if( ! DolibarrApi::_checkAccessToResource('flight',$this->flight->id)) {
55
-            throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
54
+        if (!DolibarrApi::_checkAccessToResource('flight', $this->flight->id)) {
55
+            throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login);
56 56
         }
57 57
 
58 58
         return $this->_cleanObjectDatas($this->flight);
Please login to merge, or discard this patch.