mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Updated static analysis
This commit is contained in:
parent
b4a682df52
commit
b97de29f74
@ -141,8 +141,8 @@ class StoreRecurringInvoiceRequest extends Request
|
|||||||
if (isset($input['auto_bill'])) {
|
if (isset($input['auto_bill'])) {
|
||||||
$input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']);
|
$input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']);
|
||||||
} else {
|
} else {
|
||||||
|
if (array_key_exists('client_id', $input) && $client = Client::query()->find($input['client_id'])) {
|
||||||
/** @var \App\Models\Client $client */
|
/** @var \App\Models\Client $client */
|
||||||
if (array_key_exists('client_id', $input) && $client = Client::find($input['client_id'])) {
|
|
||||||
$input['auto_bill'] = $client->getSetting('auto_bill');
|
$input['auto_bill'] = $client->getSetting('auto_bill');
|
||||||
$input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']);
|
$input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']);
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,14 @@ use Illuminate\Contracts\Validation\Rule;
|
|||||||
*/
|
*/
|
||||||
class CanStoreClientsRule implements Rule
|
class CanStoreClientsRule implements Rule
|
||||||
{
|
{
|
||||||
public $company_id;
|
|
||||||
|
|
||||||
public \App\Models\Company $company;
|
/**
|
||||||
|
* @var \App\Models\Company $company
|
||||||
|
*/
|
||||||
|
public Company $company;
|
||||||
|
|
||||||
public function __construct($company_id)
|
public function __construct(public int $company_id)
|
||||||
{
|
{
|
||||||
$this->company_id = $company_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +36,7 @@ class CanStoreClientsRule implements Rule
|
|||||||
*/
|
*/
|
||||||
public function passes($attribute, $value)
|
public function passes($attribute, $value)
|
||||||
{
|
{
|
||||||
$this->company = Company::find($this->company_id);
|
$this->company = Company::query()->find($this->company_id);
|
||||||
|
|
||||||
return $this->company->clients()->count() < $this->company->account->hosted_client_count;
|
return $this->company->clients()->count() < $this->company->account->hosted_client_count;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ class MatchBankTransactions implements ShouldQueue
|
|||||||
{
|
{
|
||||||
MultiDB::setDb($this->db);
|
MultiDB::setDb($this->db);
|
||||||
|
|
||||||
$this->company = Company::find($this->company_id);
|
$this->company = Company::query()->find($this->company_id);
|
||||||
|
|
||||||
if ($this->company->account->bank_integration_account_id) {
|
if ($this->company->account->bank_integration_account_id) {
|
||||||
$yodlee = new Yodlee($this->company->account->bank_integration_account_id);
|
$yodlee = new Yodlee($this->company->account->bank_integration_account_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user