@@ -42,17 +42,17 @@ |
||
| 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); |