1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

php cs fixes

This commit is contained in:
David Bomba 2023-11-30 17:59:17 +11:00
parent 0f92b6c82e
commit 80b85d5c21
10 changed files with 26 additions and 26 deletions

View File

@ -928,11 +928,9 @@ class BaseController extends Controller
} //allows us to selective display bank integrations back to the user if they can view / create bank transactions but without the bank balance being present in the response
elseif($this->entity_type == TaxRate::class && $user->hasIntersectPermissions(['create_invoice','edit_invoice','create_quote','edit_quote','create_purchase_order','edit_purchase_order'])) {
// need to show tax rates if the user has the ability to create documents.
}
elseif($this->entity_type == ExpenseCategory::class && $user->hasPermission('create_expense')) {
} elseif($this->entity_type == ExpenseCategory::class && $user->hasPermission('create_expense')) {
// need to show expense categories if the user has the ability to create expenses.
}
else {
} else {
$query->where('user_id', '=', $user->id);
}
} elseif (in_array($this->entity_type, [Design::class, GroupSetting::class, PaymentTerm::class, TaskStatus::class])) {

View File

@ -41,8 +41,9 @@ class VendorExpenseNotify implements ShouldQueue
{
MultiDB::setDB($this->db);
if(!$this->expense->vendor)
if(!$this->expense->vendor) {
return;
}
$this->expense->vendor->contacts->filter(function (VendorContact $contact) {
return $contact->send_email && $contact->email;

View File

@ -69,9 +69,9 @@ class PdfMock
if(isset($this->request['design_id']) && $design = Design::withTrashed()->find($this->request['design_id'])) {
$pdf_config->design = $design;
$pdf_config->entity_design_id = $design->hashed_id;
}
else
} else {
$pdf_config->design = Design::withTrashed()->find($this->decodePrimaryKey($pdf_config->entity_design_id));
}
$pdf_service->config = $pdf_config;

View File

@ -86,8 +86,7 @@ class PdfMaker
try {
$entity = $this->data['template']['entity'];
$ts->setCompany($entity->company);
}
catch(\Exception $e){
} catch(\Exception $e) {
}
}

View File

@ -179,11 +179,13 @@ class TemplateService
private function getSettings(): object
{
if($this->settings)
if($this->settings) {
return $this->settings;
}
if($this->client)
if($this->client) {
return $this->client->getMergedSettings();
}
return $this->company->settings;
}