Conditions | 1 |
Paths | 1 |
Total Lines | 31 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
44 | public function handle() |
||
45 | { |
||
46 | $client = new Client(['verify' => false]); |
||
47 | $file = file_get_contents('./resources/lang/en/app.php'); |
||
48 | $response = $client->request('POST', 'https://api.lokalise.co/api/project/import', [ |
||
49 | 'multipart' => [ |
||
50 | [ |
||
51 | 'name' => 'api_token', |
||
52 | 'contents' => $this->apikey |
||
53 | ], |
||
54 | [ |
||
55 | 'name' => 'id', |
||
56 | 'contents' => $this->project |
||
57 | ], |
||
58 | [ |
||
59 | 'name' => 'replace', |
||
60 | 'contents' => '1' |
||
61 | ], |
||
62 | [ |
||
63 | 'name' => 'lang_iso', |
||
64 | 'contents' => 'en' |
||
65 | ], |
||
66 | [ |
||
67 | 'name' => 'file', |
||
68 | 'contents' => $file, |
||
69 | 'filename' => 'app.php', |
||
70 | ] |
||
71 | ]]); |
||
72 | $body = $response->getBody(); |
||
73 | |||
74 | echo $body; |
||
75 | |||
78 |