@@ -119,55 +119,58 @@ public static function guzzleRequest($node)
119119 }
120120
121121 /**
122- * Returns the configuration in JSON format
122+ * Returns the configuration in JSON format.
123123 *
124- * @param boolean $pretty Wether to pretty print the JSON or not
124+ * @param bool $pretty Wether to pretty print the JSON or not
125125 * @return string The configration in JSON format
126126 */
127- public function getConfigurationAsJson ($ pretty = false ) {
128- $ config = array (
129- 'web ' => array (
127+ public function getConfigurationAsJson ($ pretty = false )
128+ {
129+ $ config = [
130+ 'web ' => [
130131 'host ' => '0.0.0.0 ' ,
131132 'listen ' => $ this ->daemonListen ,
132- 'ssl ' => array (
133+ 'ssl ' => [
133134 'enabled ' => $ this ->scheme === 'https ' ,
134135 'certificate ' => '/etc/letsencrypt/live/localhost/fullchain.pem ' ,
135- 'key ' => '/etc/letsencrypt/live/localhost/privkey.pem '
136- )
137- ) ,
138- 'docker ' => array (
136+ 'key ' => '/etc/letsencrypt/live/localhost/privkey.pem ' ,
137+ ],
138+ ] ,
139+ 'docker ' => [
139140 'socket ' => '/var/run/docker.sock ' ,
140- 'autoupdate_images ' => true
141- ) ,
142- 'sftp ' => array (
141+ 'autoupdate_images ' => true ,
142+ ] ,
143+ 'sftp ' => [
143144 'path ' => $ this ->daemonBase ,
144145 'port ' => $ this ->daemonSFTP ,
145- 'container ' => 'ptdl-sftp '
146- ) ,
147- 'query ' => array (
146+ 'container ' => 'ptdl-sftp ' ,
147+ ] ,
148+ 'query ' => [
148149 'kill_on_fail ' => true ,
149- 'fail_limit ' => 5
150- ) ,
151- 'logger ' => array (
150+ 'fail_limit ' => 5 ,
151+ ] ,
152+ 'logger ' => [
152153 'path ' => 'logs/ ' ,
153154 'src ' => false ,
154155 'level ' => 'info ' ,
155156 'period ' => '1d ' ,
156- 'count ' => 3
157- ) ,
158- 'remote ' => array (
157+ 'count ' => 3 ,
158+ ] ,
159+ 'remote ' => [
159160 'base ' => config ('app.url ' ),
160161 'download ' => route ('remote.download ' ),
161- 'installed ' => route ('remote.install ' )
162- ) ,
163- 'uploads ' => array (
164- 'size_limit ' => $ this ->upload_size
165- ) ,
166- 'keys ' => array ( $ this ->daemonSecret )
167- ) ;
162+ 'installed ' => route ('remote.install ' ),
163+ ] ,
164+ 'uploads ' => [
165+ 'size_limit ' => $ this ->upload_size ,
166+ ] ,
167+ 'keys ' => [ $ this ->daemonSecret ],
168+ ] ;
168169
169170 $ json_options = JSON_UNESCAPED_SLASHES ;
170- if ($ pretty ) $ json_options |= JSON_PRETTY_PRINT ;
171+ if ($ pretty ) {
172+ $ json_options |= JSON_PRETTY_PRINT ;
173+ }
171174
172175 return json_encode ($ config , $ json_options );
173176 }
0 commit comments