@@ -47,9 +47,9 @@ protected function setupCerts(array $guzzleParams): array {
4747 * @return string|null
4848 * @throws \Exception
4949 */
50- public function getHarpSharedKey (DaemonConfig $ daemonConfig ): ?string {
50+ public function getHarpSharedKey (array $ deployConfig ): ?string {
5151 try {
52- return $ this ->crypto ->decrypt ($ daemonConfig -> getDeployConfig () ['haproxy_password ' ]);
52+ return $ this ->crypto ->decrypt ($ deployConfig ['haproxy_password ' ]);
5353 } catch (\Exception $ e ) {
5454 throw new \Exception ('Failed to decrypt harp shared key ' , 0 , $ e );
5555 }
@@ -84,8 +84,8 @@ protected function buildHarpUrl(DaemonConfig $daemonConfig, string $path): strin
8484 . ltrim ($ path , '/ ' );
8585 }
8686
87- public static function isHarp (DaemonConfig $ daemonConfig ): bool {
88- return boolval ($ daemonConfig -> getDeployConfig () ['harp ' ] ?? false );
87+ public static function isHarp (array $ deployConfig ): bool {
88+ return boolval ($ deployConfig ['harp ' ] ?? false );
8989 }
9090
9191 public static function getHarpExApp (ExApp $ exApp ): array {
@@ -108,7 +108,7 @@ public static function getHarpExApp(ExApp $exApp): array {
108108 }
109109
110110 public function harpExAppUpdate (DaemonConfig $ daemonConfig , ExApp $ exApp , bool $ added ): void {
111- if (!self ::isHarp ($ daemonConfig )) {
111+ if (!self ::isHarp ($ daemonConfig-> getDeployConfig () )) {
112112 return ;
113113 }
114114 $ this ->initGuzzleClient ($ daemonConfig );
@@ -141,7 +141,7 @@ public function harpExAppUpdate(DaemonConfig $daemonConfig, ExApp $exApp, bool $
141141 * @return array{tls_enabled: bool, ca_crt: string, client_crt: string, client_key: string}|null
142142 */
143143 public function getFrpCertificates (DaemonConfig $ daemonConfig ): ?array {
144- if (!self ::isHarp ($ daemonConfig )) {
144+ if (!self ::isHarp ($ daemonConfig-> getDeployConfig () )) {
145145 return null ;
146146 }
147147 $ this ->initGuzzleClient ($ daemonConfig );
0 commit comments