mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 12:44:31 -04:00
remove unused variables from ExpenseMailbox check
This commit is contained in:
parent
8547af74ab
commit
7b29ee8ebf
@ -57,7 +57,7 @@ class StoreCompanyRequest extends Request
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules['expense_mailbox'] = new ValidExpenseMailbox($this->company->key, $this->company->account->isPaid() && $this->company->account->plan == 'enterprise');
|
$rules['expense_mailbox'] = new ValidExpenseMailbox();
|
||||||
|
|
||||||
$rules['smtp_host'] = 'sometimes|string|nullable';
|
$rules['smtp_host'] = 'sometimes|string|nullable';
|
||||||
$rules['smtp_port'] = 'sometimes|integer|nullable';
|
$rules['smtp_port'] = 'sometimes|integer|nullable';
|
||||||
|
@ -74,7 +74,7 @@ class UpdateCompanyRequest extends Request
|
|||||||
$rules['subdomain'] = ['nullable', 'regex:/^[a-zA-Z0-9.-]+[a-zA-Z0-9]$/', new ValidSubdomain()];
|
$rules['subdomain'] = ['nullable', 'regex:/^[a-zA-Z0-9.-]+[a-zA-Z0-9]$/', new ValidSubdomain()];
|
||||||
}
|
}
|
||||||
|
|
||||||
$rules['expense_mailbox'] = new ValidExpenseMailbox($this->company->key, $this->company->account->isPaid() && $this->company->account->plan == 'enterprise'); // @turbo124 check if this is right
|
$rules['expense_mailbox'] = new ValidExpenseMailbox();
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
@ -22,15 +22,13 @@ class ValidExpenseMailbox implements Rule
|
|||||||
{
|
{
|
||||||
|
|
||||||
private $validated_schema = false;
|
private $validated_schema = false;
|
||||||
private $company_key = false;
|
|
||||||
private $isEnterprise = false;
|
private $isEnterprise = false;
|
||||||
private array $endings;
|
private array $endings;
|
||||||
private bool $hasCompanyKey;
|
private bool $hasCompanyKey;
|
||||||
private array $enterprise_endings;
|
private array $enterprise_endings;
|
||||||
|
|
||||||
public function __construct(string $company_key, bool $isEnterprise = false)
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->company_key = $company_key;
|
|
||||||
$this->endings = explode(",", config('ninja.inbound_mailbox.expense_mailbox_endings'));
|
$this->endings = explode(",", config('ninja.inbound_mailbox.expense_mailbox_endings'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user