@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | * ApiNfeFasa constructor. |
31 | 31 | * @param string $apiUrl |
32 | 32 | */ |
33 | - public function __construct(string $apiUrl,?string $token = null) |
|
33 | + public function __construct(string $apiUrl, ?string $token = null) |
|
34 | 34 | { |
35 | 35 | $this->apiUrl = $apiUrl; |
36 | - $headers = empty($token)?null:array("Authorization"=>"Bearer {$token}"); |
|
36 | + $headers = empty($token) ?null:array("Authorization"=>"Bearer {$token}"); |
|
37 | 37 | $this->headers($headers); |
38 | 38 | |
39 | 39 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | foreach ($headers as $key => $header) { |
87 | - $this->headers[] = "{$key}: {$header}"; |
|
87 | + $this->headers[ ] = "{$key}: {$header}"; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | $curl = curl_init(); |
97 | 97 | |
98 | - if (empty($this->fields["files"])) { |
|
98 | + if (empty($this->fields[ "files" ])) { |
|
99 | 99 | $this->fields = (!empty($this->fields) ? http_build_query($this->fields) : null); |
100 | 100 | } |
101 | 101 |
@@ -51,8 +51,8 @@ |
||
51 | 51 | "/companies/{$this->company}/certificates", |
52 | 52 | array( |
53 | 53 | "files" => true, |
54 | - "certificate" => curl_file_create($files["certificate"],"application/x-pkcs12"), |
|
55 | - "password" => $files["password"] |
|
54 | + "certificate" => curl_file_create($files[ "certificate" ], "application/x-pkcs12"), |
|
55 | + "password" => $files[ "password" ] |
|
56 | 56 | ) |
57 | 57 | ); |
58 | 58 |