mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
chore: reformat code.
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user