chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -92,31 +92,7 @@ class InstallController extends Controller
}
/**
* Create specific RSA keys.
*/
public function keys(): void
{
// switch on PHP version.
$keys = [];
// switch on class existence.
Log::info('Will run PHP8 code.');
$keys = RSA::createKey(4096);
[$publicKey, $privateKey] = [
Passport::keyPath('oauth-public.key'),
Passport::keyPath('oauth-private.key'),
];
if (file_exists($publicKey) || file_exists($privateKey)) {
return;
}
file_put_contents($publicKey, $keys['publickey']);
file_put_contents($privateKey, $keys['privatekey']);
}
/**
* @param Request $request
* @param Request $request
*
* @return JsonResponse
*/
@@ -160,8 +136,8 @@ class InstallController extends Controller
}
/**
* @param string $command
* @param array $args
* @param string $command
* @param array $args
* @return bool
* @throws FireflyException
*/
@@ -185,4 +161,28 @@ class InstallController extends Controller
return true;
}
/**
* Create specific RSA keys.
*/
public function keys(): void
{
// switch on PHP version.
$keys = [];
// switch on class existence.
Log::info('Will run PHP8 code.');
$keys = RSA::createKey(4096);
[$publicKey, $privateKey] = [
Passport::keyPath('oauth-public.key'),
Passport::keyPath('oauth-private.key'),
];
if (file_exists($publicKey) || file_exists($privateKey)) {
return;
}
file_put_contents($publicKey, $keys['publickey']);
file_put_contents($privateKey, $keys['privatekey']);
}
}