Refactor method names to use camel case

This commit is contained in:
Andras Bacsai
2024-03-04 11:01:14 +01:00
parent b4908cfcb4
commit c20aa0b256
31 changed files with 71 additions and 49 deletions

View File

@@ -29,14 +29,14 @@ class Advanced extends Component
'application.settings.gpu_options' => 'string|required',
];
public function mount() {
$this->is_force_https_enabled = $this->application->settings->is_force_https_enabled;
$this->is_gzip_enabled = $this->application->settings->is_gzip_enabled;
$this->is_stripprefix_enabled = $this->application->settings->is_stripprefix_enabled;
$this->is_force_https_enabled = $this->application->isForceHttpsEnabled();
$this->is_gzip_enabled = $this->application->isGzipEnabled();
$this->is_stripprefix_enabled = $this->application->isStripprefixEnabled();
}
public function instantSave()
{
if ($this->application->is_log_drain_enabled()) {
if (!$this->application->destination->server->is_log_drain_enabled()) {
if ($this->application->isLogDrainEnabled()) {
if (!$this->application->destination->server->isLogDrainEnabled()) {
$this->application->settings->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on this server.');
return;

View File

@@ -53,7 +53,7 @@ class General extends Component
}
public function instantSaveAdvanced() {
try {
if (!$this->database->destination->server->is_log_drain_enabled()) {
if (!$this->database->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -52,7 +52,7 @@ class General extends Component
public function instantSaveAdvanced()
{
try {
if (!$this->database->destination->server->is_log_drain_enabled()) {
if (!$this->database->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -54,7 +54,7 @@ class General extends Component
public function instantSaveAdvanced()
{
try {
if (!$this->database->destination->server->is_log_drain_enabled()) {
if (!$this->database->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -60,7 +60,7 @@ class General extends Component
}
public function instantSaveAdvanced() {
try {
if (!$this->database->destination->server->is_log_drain_enabled()) {
if (!$this->database->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -46,7 +46,7 @@ class General extends Component
}
public function instantSaveAdvanced() {
try {
if (!$this->database->destination->server->is_log_drain_enabled()) {
if (!$this->database->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -36,7 +36,7 @@ class Database extends Component
}
public function instantSaveAdvanced()
{
if (!$this->database->service->destination->server->is_log_drain_enabled()) {
if (!$this->database->service->destination->server->isLogDrainEnabled()) {
$this->database->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -30,7 +30,7 @@ class ServiceApplicationView extends Component
}
public function instantSaveAdvanced()
{
if (!$this->application->service->destination->server->is_log_drain_enabled()) {
if (!$this->application->service->destination->server->isLogDrainEnabled()) {
$this->application->is_log_drain_enabled = false;
$this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.');
return;

View File

@@ -54,7 +54,7 @@ class LogDrains extends Component
{
try {
InstallLogDrain::run($this->server);
if (!$this->server->is_log_drain_enabled()) {
if (!$this->server->isLogDrainEnabled()) {
$this->dispatch('serverRefresh');
$this->dispatch('success', 'Log drain service stopped.');
return;