@@ -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 | } |
@@ -125,28 +125,28 @@ |
||
125 | 125 | $result = [ |
126 | 126 | 'project_id' => $this->getProjectId(), |
127 | 127 | ]; |
128 | - if (!empty($this->id)) { |
|
128 | + if ( ! empty($this->id)) { |
|
129 | 129 | $result['id'] = $this->getId(); |
130 | 130 | } |
131 | - if (!empty($this->uuid)) { |
|
131 | + if ( ! empty($this->uuid)) { |
|
132 | 132 | $result['uuid'] = $this->getUuid(); |
133 | 133 | } |
134 | - if (!empty($this->ymClientId)) { |
|
134 | + if ( ! empty($this->ymClientId)) { |
|
135 | 135 | $result['ym_client_id'] = $this->getYmClientId(); |
136 | 136 | } |
137 | - if (!empty($this->gaClientId)) { |
|
137 | + if ( ! empty($this->gaClientId)) { |
|
138 | 138 | $result['ga_client_id'] = $this->getGaClientId(); |
139 | 139 | } |
140 | - if (!empty($this->source)) { |
|
140 | + if ( ! empty($this->source)) { |
|
141 | 141 | $result['source'] = $this->getSource(); |
142 | 142 | } |
143 | - if (!empty($this->campaign)) { |
|
143 | + if ( ! empty($this->campaign)) { |
|
144 | 144 | $result['campaign'] = $this->getCampaign(); |
145 | 145 | } |
146 | - if (!empty($this->keyword)) { |
|
146 | + if ( ! empty($this->keyword)) { |
|
147 | 147 | $result['keyword'] = $this->getKeyword(); |
148 | 148 | } |
149 | - if (!empty($this->seoSystem)) { |
|
149 | + if ( ! empty($this->seoSystem)) { |
|
150 | 150 | $result['seo_system'] = $this->getSeoSystem(); |
151 | 151 | } |
152 | 152 | if ($this->visitor !== null) { |