@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace LPTracker\models; |
4 | 4 | |
5 | -use LPTracker\exceptions\LPTrackerSDKException; |
|
6 | - |
|
7 | 5 | class LeadFile extends Model |
8 | 6 | { |
9 | 7 | /** |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | |
29 | 29 | public function __construct(array $fileData = []) |
30 | 30 | { |
31 | - if (!empty($fileData['id'])) { |
|
31 | + if ( ! empty($fileData['id'])) { |
|
32 | 32 | $this->id = (int) $fileData['id']; |
33 | 33 | } |
34 | - if (!empty($fileData['name'])) { |
|
34 | + if ( ! empty($fileData['name'])) { |
|
35 | 35 | $this->name = $fileData['name']; |
36 | 36 | } |
37 | - if (!empty($fileData['ext'])) { |
|
37 | + if ( ! empty($fileData['ext'])) { |
|
38 | 38 | $this->ext = $fileData['ext']; |
39 | 39 | } |
40 | - if (!empty($fileData['data'])) { |
|
40 | + if ( ! empty($fileData['data'])) { |
|
41 | 41 | $this->data = $fileData['data']; |
42 | 42 | } |
43 | 43 | } |
@@ -48,16 +48,16 @@ discard block |
||
48 | 48 | public function toArray() |
49 | 49 | { |
50 | 50 | $result = []; |
51 | - if (!empty($this->id)) { |
|
51 | + if ( ! empty($this->id)) { |
|
52 | 52 | $result['id'] = $this->getId(); |
53 | 53 | } |
54 | - if (!empty($this->name)) { |
|
54 | + if ( ! empty($this->name)) { |
|
55 | 55 | $result['name'] = $this->getName(); |
56 | 56 | } |
57 | - if (!empty($this->ext)) { |
|
57 | + if ( ! empty($this->ext)) { |
|
58 | 58 | $result['ext'] = $this->getExt(); |
59 | 59 | } |
60 | - if (!empty($this->data)) { |
|
60 | + if ( ! empty($this->data)) { |
|
61 | 61 | $result['data'] = $this->getData(); |
62 | 62 | } |
63 | 63 | return $result; |
@@ -102,15 +102,15 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function saveFile($path) |
104 | 104 | { |
105 | - try{ |
|
105 | + try { |
|
106 | 106 | $content = $this->getData(); |
107 | - if(!empty($content)){ |
|
107 | + if ( ! empty($content)) { |
|
108 | 108 | @file_put_contents($path, base64_decode($content)); |
109 | 109 | } |
110 | - }catch(\Exception $e){} |
|
110 | + } catch (\Exception $e) {} |
|
111 | 111 | } |
112 | 112 | |
113 | - public function validate(){ |
|
113 | + public function validate() { |
|
114 | 114 | return true; |
115 | 115 | } |
116 | 116 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | if(!empty($content)){ |
108 | 108 | @file_put_contents($path, base64_decode($content)); |
109 | 109 | } |
110 | - }catch(\Exception $e){} |
|
110 | + } catch(\Exception $e){} |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | public function validate(){ |