Partially Refunded<\/span><\/h6>","amount":"$10,986.26","applied":"$10,986.26","balance":"-$146.26","refunded":"$146.26","amount_raw":"10986.260000","applied_raw":"10986.260000","refunded_raw":"146.260000","balance_raw":-146.26000000000022,"date":"30\/Sep\/2023","method":"UnionPay","currency":"USD","exchange_rate":1,"transaction_reference":"Manual entry","is_manual":1,"number":"0007","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","client":{"name":"Jakubowski Group","balance":"28296.170000","payment_balance":"0.000000","credit_balance":"1084.840000"},"paymentables":[{"invoice":"0025","amount_raw":"10986.2600","refunded_raw":"146.2600","net_raw":10840,"amount":"$10,986.26","refunded":"$146.26","net":"$10,840.00","is_credit":false,"created_at":"01\/Oct\/2023","updated_at":"01\/Oct\/2023","timestamp":1696150843}]}],"total_tax_map":[{"name":"CA Sales Tax 5%","total":"$141.90","total_raw":141.9}],"line_tax_map":[{"name":"CA Sales Tax 5%","total":"$141.90","total_raw":141.9}]}]';
public string $quote_data = '[{"id":1,"client_id":1,"user_id":1,"assigned_user_id":null,"company_id":1,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"invoice_id":null,"number":"0001","discount":1,"is_amount_discount":false,"po_number":"Molestias.","date":"1986-08-02","last_sent_date":null,"due_date":null,"next_send_date":null,"is_deleted":false,"line_items":[{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"VAT","tax_rate1":17.5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":747.36,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":110.36,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"GST","tax_rate1":10,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":700.06,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":63.06,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"","tax_rate1":0,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":637,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":0,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"GST","tax_rate1":10,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":700.06,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":63.06,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"Sales Tax","tax_rate1":5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":668.53,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":31.53,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"GST","tax_rate1":10,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":700.06,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":63.06,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":false,"tax_name1":"Sales Tax","tax_rate1":5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":"637.00","gross_line_total":668.53,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":31.53,"date":"","tax_id":"","task_id":"","expense_id":""}],"backup":null,"footer":null,"public_notes":null,"private_notes":null,"terms":null,"tax_name1":"GST","tax_rate1":"10.000000","tax_name2":"VAT","tax_rate2":"17.500000","tax_name3":"THIRDTAX","tax_rate3":"5.000000","total_taxes":"1797.280000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"custom_surcharge1":null,"custom_surcharge2":null,"custom_surcharge3":null,"custom_surcharge4":null,"custom_surcharge_tax1":0,"custom_surcharge_tax2":0,"custom_surcharge_tax3":0,"custom_surcharge_tax4":0,"exchange_rate":"1.000000","amount":"6211.690000","balance":"0.000000","partial":null,"partial_due_date":null,"last_viewed":null,"created_at":1695943654,"updated_at":1695943658,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"paid_to_date":"0.000000","subscription_id":null,"hashed_id":"VolejRejNm"},{"id":2,"client_id":1,"user_id":1,"assigned_user_id":null,"company_id":1,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"invoice_id":null,"number":"0002","discount":9,"is_amount_discount":true,"po_number":"Omnis.","date":"1988-11-22","last_sent_date":null,"due_date":null,"next_send_date":null,"is_deleted":false,"line_items":[{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":true,"tax_name1":"VAT","tax_rate1":17.5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":637,"gross_line_total":738.44,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":101.44,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":true,"tax_name1":"Sales Tax","tax_rate1":5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":637,"gross_line_total":665.98,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":28.98,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":true,"tax_name1":"Sales Tax","tax_rate1":5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":637,"gross_line_total":665.98,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":28.98,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":true,"tax_name1":"GST","tax_rate1":10,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":637,"gross_line_total":694.97,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":57.97,"date":"","tax_id":"","task_id":"","expense_id":""},{"quantity":1,"cost":637,"product_key":"Nisi.","notes":"Ut ipsa rerum.","discount":0,"is_amount_discount":true,"tax_name1":"VAT","tax_rate1":17.5,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":0,"line_total":637,"gross_line_total":738.44,"custom_value1":"https:\/\/picsum.photos\/200","custom_value2":"42","custom_value3":"Maxime dolores.","custom_value4":"Odio consequatur.","type_id":"1","product_cost":0,"tax_amount":101.44,"date":"","tax_id":"","task_id":"","expense_id":""}],"backup":null,"footer":null,"public_notes":null,"private_notes":null,"terms":null,"tax_name1":"GST","tax_rate1":"10.000000","tax_name2":"VAT","tax_rate2":"17.500000","tax_name3":"THIRDTAX","tax_rate3":"5.000000","total_taxes":"1381.560000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"custom_surcharge1":null,"custom_surcharge2":null,"custom_surcharge3":null,"custom_surcharge4":null,"custom_surcharge_tax1":0,"custom_surcharge_tax2":0,"custom_surcharge_tax3":0,"custom_surcharge_tax4":0,"exchange_rate":"1.000000","amount":"4557.560000","balance":"0.000000","partial":null,"partial_due_date":null,"last_viewed":null,"created_at":1695943654,"updated_at":1696118643,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"paid_to_date":"0.000000","subscription_id":null,"hashed_id":"Wpmbk5ezJn"}]';
-
+
public function __construct(public Company $company)
{
}
-
+
public function init(): self
{
@@ -56,12 +55,12 @@ class TemplateMock
$this->engines['projects'] = json_decode($this->project_data, true);
$this->engines['payments'] = json_decode($this->payment_data, true);
$this->engines['purchase_orders'] = json_decode($this->purchase_order_data, true);
-
+
// nlog("engines");
// nlog($this->engines);
return $this;
-
+
}
/**
diff --git a/app/Services/Template/TemplateService.php b/app/Services/Template/TemplateService.php
index 90e4169d6ef6..6cab89f1b4bb 100644
--- a/app/Services/Template/TemplateService.php
+++ b/app/Services/Template/TemplateService.php
@@ -115,7 +115,7 @@ class TemplateService
if(!is_array($array)) {
return 0;
}
-
+
return array_sum(array_column($array, $column));
});
@@ -163,7 +163,7 @@ class TemplateService
foreach($this->global_vars as $key => $value) {
$this->twig->addGlobal($key, $value);
}
-
+
$this->global_vars = [];
return $this;
@@ -193,7 +193,7 @@ class TemplateService
public function addGlobal(array $var): self
{
$this->global_vars = array_merge($this->global_vars, $var);
-
+
return $this;
}
@@ -441,7 +441,7 @@ class TemplateService
// nlog($key);
// nlog($processed);
-
+
return $processed;
})->toArray();
@@ -683,7 +683,7 @@ class TemplateService
'paymentables' => $pivot,
'refund_activity' => $this->getPaymentRefundActivity($payment),
];
-
+
return $data;
}
@@ -743,7 +743,7 @@ class TemplateService
*/
public function processQuotes($quotes): array
{
-
+
return collect($quotes)->map(function ($quote) {
return [
@@ -757,7 +757,7 @@ class TemplateService
'credit_balance' => $quote->client->credit_balance,
'vat_number' => $quote->client->vat_number ?? '',
],
- 'status_id' =>$quote->status_id,
+ 'status_id' => $quote->status_id,
'status' => Quote::stringStatus($quote->status_id),
'number' => $quote->number ?: '',
'discount' => (float) $quote->discount,
@@ -975,7 +975,7 @@ class TemplateService
private function transformProject(Project $project, bool $nested = false): array
{
-
+
return [
'name' => $project->name ?: '',
'number' => $project->number ?: '',
@@ -993,7 +993,7 @@ class TemplateService
'custom_value4' => (string) $project->custom_value4 ?: '',
'color' => (string) $project->color ?: '',
'current_hours' => (int) $project->current_hours ?: 0,
- 'tasks' => ($project->tasks && !$nested) ? $this->processTasks($project->tasks, true) : [],
+ 'tasks' => ($project->tasks && !$nested) ? $this->processTasks($project->tasks, true) : [],
'client' => $project->client ? [
'name' => $project->client->present()->name(),
'balance' => $project->client->balance,
@@ -1058,7 +1058,7 @@ class TemplateService
'is_amount_discount' => (bool)($purchase_order->is_amount_discount ?: false),
'footer' => $purchase_order->footer ?: '',
'partial' => (float)($purchase_order->partial ?: 0.0),
- 'partial_due_date' => $purchase_order->partial_due_date ? $this->translateDate($purchase_order->partial_due_date, $purchase_order->vendor->date_format(), $purchase_order->vendor->locale()): '',
+ 'partial_due_date' => $purchase_order->partial_due_date ? $this->translateDate($purchase_order->partial_due_date, $purchase_order->vendor->date_format(), $purchase_order->vendor->locale()) : '',
'custom_value1' => (string)$purchase_order->custom_value1 ?: '',
'custom_value2' => (string)$purchase_order->custom_value2 ?: '',
'custom_value3' => (string)$purchase_order->custom_value3 ?: '',
@@ -1073,7 +1073,7 @@ class TemplateService
'custom_surcharge_tax2' => (bool)$purchase_order->custom_surcharge_tax2,
'custom_surcharge_tax3' => (bool)$purchase_order->custom_surcharge_tax3,
'custom_surcharge_tax4' => (bool)$purchase_order->custom_surcharge_tax4,
- 'line_items' => $purchase_order->line_items ? $this->padLineItems($purchase_order->line_items, $purchase_order->vendor): (array)[],
+ 'line_items' => $purchase_order->line_items ? $this->padLineItems($purchase_order->line_items, $purchase_order->vendor) : (array)[],
'exchange_rate' => (float)$purchase_order->exchange_rate,
'currency_id' => $purchase_order->currency_id ? (string) $purchase_order->currency_id : '',
];
@@ -1367,7 +1367,7 @@ class TemplateService
$var = str_replace("custom", "custom_value", $_variable);
$hidden_prop = ($data_ref == 'entity_details-') ? $this->entityVariableCheck($variable) : false;
-
+
if (in_array($_variable, $_customs) && !empty($this->entity->{$var})) {
$elements[] = ['element' => 'tr', 'elements' => [
['element' => 'th', 'content' => $variable . '_label', 'properties' => ['data-ref' => $data_ref . substr($variable, 1) . '_label']],
@@ -1532,7 +1532,7 @@ class TemplateService
}
}
-
+
return $this;
}
diff --git a/app/Services/User/UserService.php b/app/Services/User/UserService.php
index 7b6a996c1211..ed51ffc56d47 100644
--- a/app/Services/User/UserService.php
+++ b/app/Services/User/UserService.php
@@ -25,11 +25,11 @@ class UserService
{
}
- public function invite(Company $company, bool $is_react=true)
+ public function invite(Company $company, bool $is_react = true)
{
try {
- $nmo = new NinjaMailerObject;
+ $nmo = new NinjaMailerObject();
$nmo->mailable = new NinjaMailer((new VerifyUserObject($this->user, $company, $is_react))->build());
$nmo->company = $company;
$nmo->to_user = $this->user;
diff --git a/app/Transformers/BankTransactionRuleTransformer.php b/app/Transformers/BankTransactionRuleTransformer.php
index ca3bf7262acd..12eea7e595e8 100644
--- a/app/Transformers/BankTransactionRuleTransformer.php
+++ b/app/Transformers/BankTransactionRuleTransformer.php
@@ -78,7 +78,7 @@ class BankTransactionRuleTransformer extends EntityTransformer
}
$transformer = new ClientTransformer($this->serializer);
-
+
return $this->includeItem($bank_transaction_rule->client, $transformer, Client::class);
}
diff --git a/app/Transformers/ClientContactLoginTransformer.php b/app/Transformers/ClientContactLoginTransformer.php
index ba0062c16863..f73c9b02dc39 100644
--- a/app/Transformers/ClientContactLoginTransformer.php
+++ b/app/Transformers/ClientContactLoginTransformer.php
@@ -43,7 +43,7 @@ class ClientContactLoginTransformer extends EntityTransformer
'custom_value2' => $contact->custom_value2 ?: '',
'custom_value3' => $contact->custom_value3 ?: '',
'custom_value4' => $contact->custom_value4 ?: '',
- 'token'=> $contact->token ?: '',
+ 'token' => $contact->token ?: '',
];
}
}
diff --git a/app/Transformers/ClientGatewayTokenTransformer.php b/app/Transformers/ClientGatewayTokenTransformer.php
index bb839486b36d..be03c39d4030 100644
--- a/app/Transformers/ClientGatewayTokenTransformer.php
+++ b/app/Transformers/ClientGatewayTokenTransformer.php
@@ -46,7 +46,7 @@ class ClientGatewayTokenTransformer extends EntityTransformer
private function typeCastMeta($meta)
{
- $casted = new stdClass;
+ $casted = new stdClass();
if (property_exists($meta, 'exp_month')) {
$casted->exp_month = (string) $meta->exp_month;
diff --git a/app/Transformers/ClientTransformer.php b/app/Transformers/ClientTransformer.php
index 8bbddfa9f257..c1f4ea72010f 100644
--- a/app/Transformers/ClientTransformer.php
+++ b/app/Transformers/ClientTransformer.php
@@ -102,7 +102,7 @@ class ClientTransformer extends EntityTransformer
if (!$client->group_settings) {
return null;
}
-
+
$transformer = new GroupSettingTransformer($this->serializer);
return $this->includeItem($client->group_settings, $transformer, GroupSetting::class);
@@ -150,7 +150,7 @@ class ClientTransformer extends EntityTransformer
'shipping_state' => $client->shipping_state ?: '',
'shipping_postal_code' => $client->shipping_postal_code ?: '',
'shipping_country_id' => (string) $client->shipping_country_id ?: '',
- 'settings' => $client->settings ?: new stdClass,
+ 'settings' => $client->settings ?: new stdClass(),
'is_deleted' => (bool) $client->is_deleted,
'vat_number' => $client->vat_number ?: '',
'id_number' => $client->id_number ?: '',
@@ -162,7 +162,7 @@ class ClientTransformer extends EntityTransformer
'has_valid_vat_number' => (bool) $client->has_valid_vat_number,
'is_tax_exempt' => (bool) $client->is_tax_exempt,
'routing_id' => (string) $client->routing_id,
- 'tax_info' => $client->tax_data ?: new \stdClass,
+ 'tax_info' => $client->tax_data ?: new \stdClass(),
'classification' => $client->classification ?: '',
];
}
diff --git a/app/Transformers/CompanyGatewayTransformer.php b/app/Transformers/CompanyGatewayTransformer.php
index 768e8f903b5f..6fbd9e83e48d 100644
--- a/app/Transformers/CompanyGatewayTransformer.php
+++ b/app/Transformers/CompanyGatewayTransformer.php
@@ -68,7 +68,7 @@ class CompanyGatewayTransformer extends EntityTransformer
'show_shipping_address' => (bool) $company_gateway->show_shipping_address, //@deprecated
'update_details' => (bool) $company_gateway->update_details,
'config' => (string) $company_gateway->getConfigTransformed(),
- 'fees_and_limits' => $company_gateway->fees_and_limits ?: new stdClass,
+ 'fees_and_limits' => $company_gateway->fees_and_limits ?: new stdClass(),
'updated_at' => (int) $company_gateway->updated_at,
'archived_at' => (int) $company_gateway->deleted_at,
'created_at' => (int) $company_gateway->created_at,
diff --git a/app/Transformers/CompanyTokenHashedTransformer.php b/app/Transformers/CompanyTokenHashedTransformer.php
index d9c1ee132fc4..59a53b4d7a02 100644
--- a/app/Transformers/CompanyTokenHashedTransformer.php
+++ b/app/Transformers/CompanyTokenHashedTransformer.php
@@ -45,7 +45,7 @@ class CompanyTokenHashedTransformer extends EntityTransformer
'user_id' => $this->encodePrimaryKey($company_token->user_id),
'token' => substr($company_token->token, 0, 10).'xxxxxxxxxxx',
'name' => $company_token->name ?: '',
- 'is_system' =>(bool) $company_token->is_system,
+ 'is_system' => (bool) $company_token->is_system,
'updated_at' => (int) $company_token->updated_at,
'archived_at' => (int) $company_token->deleted_at,
'created_at' => (int) $company_token->created_at,
diff --git a/app/Transformers/CompanyTokenTransformer.php b/app/Transformers/CompanyTokenTransformer.php
index 76083f063ff7..cbd30be079aa 100644
--- a/app/Transformers/CompanyTokenTransformer.php
+++ b/app/Transformers/CompanyTokenTransformer.php
@@ -45,7 +45,7 @@ class CompanyTokenTransformer extends EntityTransformer
'user_id' => $this->encodePrimaryKey($company_token->user_id),
'token' => $company_token->token,
'name' => $company_token->name ?: '',
- 'is_system' =>(bool) $company_token->is_system,
+ 'is_system' => (bool) $company_token->is_system,
'updated_at' => (int) $company_token->updated_at,
'archived_at' => (int) $company_token->deleted_at,
'created_at' => (int) $company_token->created_at,
diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php
index 0ea80a1e33ec..a52cb317b094 100644
--- a/app/Transformers/CompanyTransformer.php
+++ b/app/Transformers/CompanyTransformer.php
@@ -116,7 +116,7 @@ class CompanyTransformer extends EntityTransformer
*/
public function transform(Company $company)
{
- $std = new stdClass;
+ $std = new stdClass();
return [
'id' => (string) $this->encodePrimaryKey($company->id),
@@ -146,7 +146,7 @@ class CompanyTransformer extends EntityTransformer
'enabled_modules' => (int) $company->enabled_modules,
'updated_at' => (int) $company->updated_at,
'archived_at' => (int) $company->deleted_at,
- 'created_at' =>(int) $company->created_at,
+ 'created_at' => (int) $company->created_at,
'slack_webhook_url' => (string) $company->slack_webhook_url,
'google_analytics_url' => (string) $company->google_analytics_key, //@deprecate 1-2-2021
'google_analytics_key' => (string) $company->google_analytics_key,
@@ -158,7 +158,7 @@ class CompanyTransformer extends EntityTransformer
'is_large' => (bool) $this->isLarge($company),
'is_disabled' => (bool) $company->is_disabled,
'enable_shop_api' => (bool) $company->enable_shop_api,
- 'mark_expenses_invoiceable'=> (bool) $company->mark_expenses_invoiceable,
+ 'mark_expenses_invoiceable' => (bool) $company->mark_expenses_invoiceable,
'mark_expenses_paid' => (bool) $company->mark_expenses_paid,
'invoice_expense_documents' => (bool) $company->invoice_expense_documents,
'invoice_task_timelog' => (bool) $company->invoice_task_timelog,
@@ -168,10 +168,10 @@ class CompanyTransformer extends EntityTransformer
'use_credits_payment' => 'always', // @deprecate 1-2-2021
'default_task_is_date_based' => (bool) $company->default_task_is_date_based,
'enable_product_discount' => (bool) $company->enable_product_discount,
- 'calculate_expense_tax_by_amount' =>(bool) $company->calculate_expense_tax_by_amount,
+ 'calculate_expense_tax_by_amount' => (bool) $company->calculate_expense_tax_by_amount,
'hide_empty_columns_on_pdf' => false, // @deprecate 1-2-2021
'expense_inclusive_taxes' => (bool) $company->expense_inclusive_taxes,
- 'expense_amount_is_pretax' =>(bool) true, //@deprecate 1-2-2021
+ 'expense_amount_is_pretax' => (bool) true, //@deprecate 1-2-2021
'oauth_password_required' => (bool) $company->oauth_password_required,
'session_timeout' => (int) $company->session_timeout,
'default_password_timeout' => (int) $company->default_password_timeout,
@@ -198,12 +198,12 @@ class CompanyTransformer extends EntityTransformer
'notify_vendor_when_paid' => (bool) $company->notify_vendor_when_paid,
'invoice_task_hours' => (bool) $company->invoice_task_hours,
'calculate_taxes' => (bool) $company->calculate_taxes,
- 'tax_data' => $company->tax_data ?: new \stdClass,
+ 'tax_data' => $company->tax_data ?: new \stdClass(),
'has_e_invoice_certificate' => $company->e_invoice_certificate ? true : false,
'has_e_invoice_certificate_passphrase' => $company->e_invoice_certificate_passphrase ? true : false,
'invoice_task_project_header' => (bool) $company->invoice_task_project_header,
'invoice_task_item_description' => (bool) $company->invoice_task_item_description,
- 'origin_tax_data' => $company->origin_tax_data ?: new \stdClass,
+ 'origin_tax_data' => $company->origin_tax_data ?: new \stdClass(),
];
}
diff --git a/app/Transformers/CompanyUserTransformer.php b/app/Transformers/CompanyUserTransformer.php
index 43e76a0f84c0..e3a3f54ac5af 100644
--- a/app/Transformers/CompanyUserTransformer.php
+++ b/app/Transformers/CompanyUserTransformer.php
@@ -38,7 +38,7 @@ class CompanyUserTransformer extends EntityTransformer
public function transform(CompanyUser $company_user)
{
- $blank_obj = new \stdClass;
+ $blank_obj = new \stdClass();
return [
'permissions' => $company_user->permissions ?: '',
diff --git a/app/Transformers/EntityTransformer.php b/app/Transformers/EntityTransformer.php
index acc4177be080..88c940dddabb 100644
--- a/app/Transformers/EntityTransformer.php
+++ b/app/Transformers/EntityTransformer.php
@@ -17,9 +17,9 @@ class EntityTransformer extends TransformerAbstract
{
protected $serializer;
- const API_SERIALIZER_ARRAY = 'array';
+ public const API_SERIALIZER_ARRAY = 'array';
- const API_SERIALIZER_JSON = 'json';
+ public const API_SERIALIZER_JSON = 'json';
public function __construct($serializer = null)
{
diff --git a/app/Transformers/ExpenseTransformer.php b/app/Transformers/ExpenseTransformer.php
index aa13889a9298..c0fd15a71b19 100644
--- a/app/Transformers/ExpenseTransformer.php
+++ b/app/Transformers/ExpenseTransformer.php
@@ -28,7 +28,7 @@ class ExpenseTransformer extends EntityTransformer
{
use MakesHash;
use SoftDeletes;
-
+
protected array $defaultIncludes = [
'documents',
];
diff --git a/app/Transformers/GroupSettingTransformer.php b/app/Transformers/GroupSettingTransformer.php
index 17e47c80562c..dcafb1425fe4 100644
--- a/app/Transformers/GroupSettingTransformer.php
+++ b/app/Transformers/GroupSettingTransformer.php
@@ -42,7 +42,7 @@ class GroupSettingTransformer extends EntityTransformer
return [
'id' => $this->encodePrimaryKey($group_setting->id),
'name' => (string) $group_setting->name ?: '',
- 'settings' => $group_setting->settings ?: new stdClass,
+ 'settings' => $group_setting->settings ?: new stdClass(),
'created_at' => (int) $group_setting->created_at,
'updated_at' => (int) $group_setting->updated_at,
'archived_at' => (int) $group_setting->deleted_at,
diff --git a/app/Transformers/InvoiceTransformer.php b/app/Transformers/InvoiceTransformer.php
index 3f3b57e169e6..c732fa945de1 100644
--- a/app/Transformers/InvoiceTransformer.php
+++ b/app/Transformers/InvoiceTransformer.php
@@ -157,7 +157,7 @@ class InvoiceTransformer extends EntityTransformer
'paid_to_date' => (float) $invoice->paid_to_date,
'subscription_id' => $this->encodePrimaryKey($invoice->subscription_id),
'auto_bill_enabled' => (bool) $invoice->auto_bill_enabled,
- 'tax_info' => $invoice->tax_data ?: new \stdClass,
+ 'tax_info' => $invoice->tax_data ?: new \stdClass(),
];
if (request()->has('reminder_schedule') && request()->query('reminder_schedule') == 'true') {
diff --git a/app/Transformers/PaymentTransformer.php b/app/Transformers/PaymentTransformer.php
index 0f37438bce7e..86e970113c9a 100644
--- a/app/Transformers/PaymentTransformer.php
+++ b/app/Transformers/PaymentTransformer.php
@@ -82,7 +82,7 @@ class PaymentTransformer extends EntityTransformer
public function includeType(Payment $payment)
{
- return $this->includeItem($payment, new PaymentTypeTransformer, PaymentType::class);
+ return $this->includeItem($payment, new PaymentTypeTransformer(), PaymentType::class);
}
public function transform(Payment $payment)
@@ -114,7 +114,7 @@ class PaymentTransformer extends EntityTransformer
'client_contact_id' => (string) $this->encodePrimaryKey($payment->client_contact_id),
'company_gateway_id' => (string) $this->encodePrimaryKey($payment->company_gateway_id),
'gateway_type_id' => (string) $payment->gateway_type_id ?: '',
- 'status_id'=> (string) $payment->status_id,
+ 'status_id' => (string) $payment->status_id,
'project_id' => (string) $this->encodePrimaryKey($payment->project_id),
'vendor_id' => (string) $this->encodePrimaryKey($payment->vendor_id),
'currency_id' => (string) $payment->currency_id ?: '',
diff --git a/app/Transformers/PaymentTypeTransformer.php b/app/Transformers/PaymentTypeTransformer.php
index 3d9aae3da634..5c7a91861ba0 100644
--- a/app/Transformers/PaymentTypeTransformer.php
+++ b/app/Transformers/PaymentTypeTransformer.php
@@ -15,7 +15,6 @@ use App\Models\Payment;
class PaymentTypeTransformer extends EntityTransformer
{
-
public function transform(Payment $payment)
{
return [
diff --git a/app/Transformers/PurchaseOrderTransformer.php b/app/Transformers/PurchaseOrderTransformer.php
index 8404dd56d7f9..d8015a7b26bd 100644
--- a/app/Transformers/PurchaseOrderTransformer.php
+++ b/app/Transformers/PurchaseOrderTransformer.php
@@ -62,7 +62,7 @@ class PurchaseOrderTransformer extends EntityTransformer
return $this->includeCollection($purchase_order->documents, $transformer, Document::class);
}
-
+
public function includeExpense(PurchaseOrder $purchase_order)
{
$transformer = new ExpenseTransformer($this->serializer);
diff --git a/app/Transformers/SchedulerTransformer.php b/app/Transformers/SchedulerTransformer.php
index cbc4af3d7e1e..ea012a8185d9 100644
--- a/app/Transformers/SchedulerTransformer.php
+++ b/app/Transformers/SchedulerTransformer.php
@@ -27,7 +27,7 @@ class SchedulerTransformer extends EntityTransformer
'next_run' => $scheduler->next_run_client->format('Y-m-d'),
'template' => (string) $scheduler->template,
'is_paused' => (bool) $scheduler->is_paused,
- 'parameters'=> (array) $scheduler->parameters,
+ 'parameters' => (array) $scheduler->parameters,
'is_deleted' => (bool) $scheduler->is_deleted,
'updated_at' => (int) $scheduler->updated_at,
'created_at' => (int) $scheduler->created_at,
diff --git a/app/Transformers/Shop/CompanyShopProfileTransformer.php b/app/Transformers/Shop/CompanyShopProfileTransformer.php
index 358ad5e321bd..6674f7a6f3ee 100644
--- a/app/Transformers/Shop/CompanyShopProfileTransformer.php
+++ b/app/Transformers/Shop/CompanyShopProfileTransformer.php
@@ -42,7 +42,7 @@ class CompanyShopProfileTransformer extends EntityTransformer
*/
public function transform(Company $company)
{
- $std = new stdClass;
+ $std = new stdClass();
return [
'company_key' => (string) $company->company_key ?: '',
@@ -52,7 +52,7 @@ class CompanyShopProfileTransformer extends EntityTransformer
private function trimCompany($company)
{
- $std = new stdClass;
+ $std = new stdClass();
$trimmed_company_settings = [
'custom_fields' => $company->custom_fields ?: $std,
@@ -74,7 +74,7 @@ class CompanyShopProfileTransformer extends EntityTransformer
'vat_number' => $company->settings->vat_number,
];
- $new_settings = new stdClass;
+ $new_settings = new stdClass();
foreach ($trimmed_company_settings as $key => $value) {
$new_settings->{$key} = $value;
diff --git a/app/Transformers/SubscriptionTransformer.php b/app/Transformers/SubscriptionTransformer.php
index 7a9b53535ceb..f06537d2421f 100644
--- a/app/Transformers/SubscriptionTransformer.php
+++ b/app/Transformers/SubscriptionTransformer.php
@@ -69,7 +69,7 @@ class SubscriptionTransformer extends EntityTransformer
'archived_at' => (int) $subscription->deleted_at,
'plan_map' => '', //@deprecated 03/04/2021
'use_inventory_management' => (bool) $subscription->use_inventory_management,
- 'optional_recurring_product_ids' =>(string)$subscription->optional_recurring_product_ids,
+ 'optional_recurring_product_ids' => (string)$subscription->optional_recurring_product_ids,
'optional_product_ids' => (string) $subscription->optional_product_ids,
'registration_required' => (bool) $subscription->registration_required,
];
diff --git a/app/Utils/ClientPortal/MagicLink.php b/app/Utils/ClientPortal/MagicLink.php
index 066377b9a3da..e336a02086e2 100644
--- a/app/Utils/ClientPortal/MagicLink.php
+++ b/app/Utils/ClientPortal/MagicLink.php
@@ -17,7 +17,7 @@ use Illuminate\Support\Str;
class MagicLink
{
//return a magic login link URL
- public static function create($email, $company_id, $url = null) :string
+ public static function create($email, $company_id, $url = null): string
{
$magic_key = Str::random(64);
$timeout = 600; //seconds
diff --git a/app/Utils/EmailStats.php b/app/Utils/EmailStats.php
index 6af60ece2fe6..3ca23f432451 100644
--- a/app/Utils/EmailStats.php
+++ b/app/Utils/EmailStats.php
@@ -18,7 +18,7 @@ use Illuminate\Support\Facades\Cache;
*/
class EmailStats
{
- const EMAIL = 'email_';
+ public const EMAIL = 'email_';
/**
* Increments the counter for emails sent
diff --git a/app/Utils/Helpers.php b/app/Utils/Helpers.php
index 029d79372bf9..0092fe007671 100644
--- a/app/Utils/Helpers.php
+++ b/app/Utils/Helpers.php
@@ -27,7 +27,7 @@ class Helpers
{
if (! $client) {
$elements['signature'] = '';
- $elements['settings'] = new stdClass;
+ $elements['settings'] = new stdClass();
$elements['whitelabel'] = true;
$elements['company'] = '';
diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php
index 2d2d3e7fc6a1..d4fe57993252 100644
--- a/app/Utils/HtmlEngine.php
+++ b/app/Utils/HtmlEngine.php
@@ -35,7 +35,7 @@ class HtmlEngine
use AppSetup;
use MakesHash;
use DesignCalculator;
-
+
/** @var \App\Models\Invoice | \App\Models\Credit | \App\Models\RecurringInvoice | \App\Models\Quote $entity **/
public $entity;
@@ -60,7 +60,7 @@ class HtmlEngine
private $helpers;
-
+
/**
* __construct
*
@@ -78,9 +78,9 @@ class HtmlEngine
$this->company = $invitation->company;
$this->contact = $invitation->contact->load('client');
-
+
$this->client = $this->contact->client->load('company', 'country');
-
+
$this->entity->load('client');
$this->settings = $this->client->getMergedSettings();
@@ -116,7 +116,7 @@ class HtmlEngine
}
}
- public function buildEntityDataArray() :array
+ public function buildEntityDataArray(): array
{
if (! $this->client->currency()) {
throw new Exception(debug_backtrace()[1]['function'], 1);
@@ -136,7 +136,7 @@ class HtmlEngine
$data['$show_shipping_address_block'] = ['value' => $this->settings?->show_shipping_address ? 'block' : 'none', 'label' => ''];
// $data['$show_shipping_address_visibility'] = ['value' => $this->settings?->show_shipping_address ? 'visible' : 'hidden', 'label' => ''];
$data['$show_shipping_address_visibility'] = ['value' => $this->settings?->show_shipping_address ? 1 : 0, 'label' => ''];
-
+
$data['$order_number'] = ['value' => '', 'label' => ctrans('texts.order_number')];
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
$data['$quantity'] = ['value' => '', 'label' => ctrans('texts.quantity')];
@@ -161,7 +161,7 @@ class HtmlEngine
$data['$due_date'] = ['value' => $this->translateDate($this->entity->due_date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.'.$this->entity_string.'_due_date')];
$data['$partial_due_date'] = ['value' => $this->translateDate($this->entity->partial_due_date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.'.$this->entity_string.'_due_date')];
-
+
$data['$dueDate'] = &$data['$due_date'];
$data['$payment_due'] = ['value' => $this->translateDate($this->entity->due_date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.payment_due')];
@@ -181,7 +181,7 @@ class HtmlEngine
$data['$triangular_tax'] = ['value' => ctrans('texts.triangular_tax'), 'label' => ''];
$data['$tax_info'] = ['value' => $this->taxLabel(), 'label' => ''];
$data['$net'] = ['value' => '', 'label' => ctrans('texts.net')];
-
+
if ($this->entity_string == 'invoice' || $this->entity_string == 'recurring_invoice') {
$data['$entity'] = ['value' => ctrans('texts.invoice'), 'label' => ctrans('texts.invoice')];
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number')];
@@ -225,7 +225,7 @@ class HtmlEngine
$data['$status_logo'] = ['value' => ' ' . ctrans('texts.paid') .'
', 'label' => ''];
$data['$show_paid_stamp'] = ['value' => $this->entity->status_id == 4 && $this->settings?->show_paid_stamp ? 'flex' : 'none', 'label' => ''];
-
+
if ($this->entity->vendor) {
$data['$invoice.vendor'] = ['value' => $this->entity->vendor->present()->name(), 'label' => ctrans('texts.vendor_name')];
}
@@ -318,7 +318,7 @@ class HtmlEngine
$data['$invoice.custom4'] = &$data['$credit.custom4'];
}
- $data['$portal_url'] = ['value' => $this->invitation->getPortalLink(), 'label' =>''];
+ $data['$portal_url'] = ['value' => $this->invitation->getPortalLink(), 'label' => ''];
$data['$entity_number'] = &$data['$number'];
$data['$invoice.discount'] = ['value' => Number::formatMoney($this->entity_calc->getTotalDiscount(), $this->client) ?: ' ', 'label' => ($this->entity->is_amount_discount) ? ctrans('texts.discount') : ctrans('texts.discount').' '.$this->entity->discount.'%'];
@@ -337,19 +337,19 @@ class HtmlEngine
/* Do not change the order of these */
if ($this->entity->partial > 0) {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->partial, $this->client) ?: ' ', 'label' => ctrans('texts.partial_due')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->partial), 'label' => ctrans('texts.partial_due')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->partial), 'label' => ctrans('texts.partial_due')];
$data['$balance_due_raw'] = ['value' => $this->entity->partial, 'label' => ctrans('texts.partial_due')];
$data['$amount_raw'] = ['value' => $this->entity->partial, 'label' => ctrans('texts.partial_due')];
$data['$due_date'] = ['value' => $this->translateDate($this->entity->partial_due_date, $this->client->date_format(), $this->client->locale()) ?: ' ', 'label' => ctrans('texts.'.$this->entity_string.'_due_date')];
} else {
if ($this->entity->status_id == 1 || $this->entity_string == 'recurring_invoice') {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->amount, $this->client) ?: ' ', 'label' => ctrans('texts.balance_due')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->amount), 'label' => ctrans('texts.balance_due')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->amount), 'label' => ctrans('texts.balance_due')];
$data['$balance_due_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.balance_due')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
} else {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->balance, $this->client) ?: ' ', 'label' => ctrans('texts.balance_due')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->balance), 'label' => ctrans('texts.balance_due')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->balance), 'label' => ctrans('texts.balance_due')];
$data['$balance_due_raw'] = ['value' => $this->entity->balance, 'label' => ctrans('texts.balance_due')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
}
@@ -361,14 +361,14 @@ class HtmlEngine
if ($this->entity_string == 'credit') {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->balance, $this->client) ?: ' ', 'label' => ctrans('texts.credit_balance')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->balance), 'label' => ctrans('texts.credit_balance')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->balance), 'label' => ctrans('texts.credit_balance')];
$data['$balance_due_raw'] = ['value' => $this->entity->balance, 'label' => ctrans('texts.credit_balance')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
}
if ($this->entity_string == 'credit' && $this->entity->status_id == 1) {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->amount, $this->client) ?: ' ', 'label' => ctrans('texts.credit_balance')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->amount), 'label' => ctrans('texts.credit_balance')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->amount), 'label' => ctrans('texts.credit_balance')];
$data['$balance_due_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.credit_balance')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
}
@@ -451,7 +451,7 @@ class HtmlEngine
$data['$country'] = ['value' => isset($this->client->country->name) ? ctrans('texts.country_' . $this->client->country->name) : '', 'label' => ctrans('texts.country')];
$data['$country_2'] = ['value' => isset($this->client->country) ? $this->client->country->iso_3166_2 : '', 'label' => ctrans('texts.country')];
$data['$email'] = ['value' => isset($this->contact) ? $this->contact->email : 'no contact email on record', 'label' => ctrans('texts.email')];
-
+
if (str_contains($data['$email']['value'], 'example.com')) {
$data['$email'] = ['value' => '', 'label' => ctrans('texts.email')];
}
@@ -621,7 +621,7 @@ class HtmlEngine
if ($this->settings->signature_on_pdf) {
$data['$contact.signature'] = ['value' => $this->invitation->signature_base64, 'label' => ctrans('texts.signature')];
$data['$contact.signature_date'] = ['value' => $this->translateDate($this->invitation->signature_date, $this->client->date_format(), $this->client->locale()), 'label' => ctrans('texts.date')];
-
+
} else {
$data['$contact.signature'] = ['value' => '', 'label' => ''];
$data['$contact.signature_date'] = ['value' => '', 'label' => ctrans('texts.date')];
@@ -656,7 +656,7 @@ class HtmlEngine
//$data['$entity_footer'] = ['value' => $this->client->getSetting("{$this->entity_string}_footer"), 'label' => ''];
$data['$entity_footer'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->footer ?: ''), $this->client), 'label' => ''];
$data['$footer'] = &$data['$entity_footer'];
-
+
$data['$page_size'] = ['value' => $this->settings->page_size, 'label' => ''];
$data['$page_layout'] = ['value' => property_exists($this->settings, 'page_layout') ? $this->settings->page_layout : 'Portrait', 'label' => ''];
@@ -667,7 +667,7 @@ class HtmlEngine
/*Payment Aliases*/
$data['$paymentLink'] = &$data['$payment_link'];
$data['$payment_url'] = &$data['$payment_link'];
-
+
$data['$dir'] = ['value' => in_array(optional($this->client->language())->locale, ['ar', 'he']) ? 'rtl' : 'ltr', 'label' => ''];
$data['$dir_text_align'] = ['value' => in_array(optional($this->client->language())->locale, ['ar', 'he']) ? 'right' : 'left', 'label' => ''];
@@ -725,7 +725,7 @@ class HtmlEngine
return $data;
}
-
+
/**
* Returns a localized string for tax compliance purposes
*
@@ -755,7 +755,7 @@ class HtmlEngine
return $this->entity->balance;
}
- public function makeValues() :array
+ public function makeValues(): array
{
$data = [];
@@ -768,7 +768,7 @@ class HtmlEngine
return $data;
}
- public function makeValuesNoPrefix() :array
+ public function makeValuesNoPrefix(): array
{
$data = [];
@@ -796,7 +796,7 @@ class HtmlEngine
return $data;
}
- private function totalTaxLabels() :string
+ private function totalTaxLabels(): string
{
$data = '';
@@ -811,7 +811,7 @@ class HtmlEngine
return $data;
}
- private function totalTaxValues() :string
+ private function totalTaxValues(): string
{
$data = '';
@@ -826,7 +826,7 @@ class HtmlEngine
return $data;
}
- private function lineTaxLabels() :string
+ private function lineTaxLabels(): string
{
$tax_map = $this->entity_calc->getTaxMap();
@@ -839,7 +839,7 @@ class HtmlEngine
return $data;
}
- private function getCountryName() :string
+ private function getCountryName(): string
{
$countries = Cache::get('countries');
@@ -865,7 +865,7 @@ class HtmlEngine
}
- private function getCountryCode() :string
+ private function getCountryCode(): string
{
$country = Country::find($this->settings->country_id);
@@ -884,7 +884,7 @@ class HtmlEngine
* @return string a collection of rows with line item
* aggregate data
*/
- private function makeLineTaxes() :string
+ private function makeLineTaxes(): string
{
$tax_map = $this->entity_calc->getTaxMap();
@@ -899,7 +899,7 @@ class HtmlEngine
return $data;
}
- private function lineTaxValues() :string
+ private function lineTaxValues(): string
{
$tax_map = $this->entity_calc->getTaxMap();
@@ -912,7 +912,7 @@ class HtmlEngine
return $data;
}
- private function makeTotalTaxes() :string
+ private function makeTotalTaxes(): string
{
$data = '';
@@ -930,7 +930,7 @@ class HtmlEngine
return $data;
}
- private function parseLabelsAndValues($labels, $values, $section) :string
+ private function parseLabelsAndValues($labels, $values, $section): string
{
$section = strtr($section, $labels);
@@ -951,7 +951,7 @@ class HtmlEngine
* of Repeating headers and footers on the PDF.
* @return string The css string
*/
- private function generateCustomCSS() :string
+ private function generateCustomCSS(): string
{
$header_and_footer = '
.header, .header-space {
@@ -1079,10 +1079,10 @@ html {
$html = $dom->saveHTML();
$dom = null;
-
+
return $html;
}
-
+
/**
* buildViewButton
*
diff --git a/app/Utils/Ninja.php b/app/Utils/Ninja.php
index 5a788bb44a7a..ab8bd9eee575 100644
--- a/app/Utils/Ninja.php
+++ b/app/Utils/Ninja.php
@@ -19,7 +19,7 @@ use Illuminate\Support\Facades\Http;
*/
class Ninja
{
- const TEST_USERNAME = 'user@example.com';
+ public const TEST_USERNAME = 'user@example.com';
public static function isSelfHost()
{
@@ -136,7 +136,7 @@ class Ninja
];
}
- public static function transformTranslations($settings) :array
+ public static function transformTranslations($settings): array
{
$translations = [];
@@ -211,7 +211,7 @@ class Ninja
* but can't guarantee that it is a base64 encoded string
*
*/
- public static function isBase64Encoded(string $s) : bool
+ public static function isBase64Encoded(string $s): bool
{
// Check if there are valid base64 characters
if (! preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $s)) {
diff --git a/app/Utils/Number.php b/app/Utils/Number.php
index b29466641441..67568d6da81b 100644
--- a/app/Utils/Number.php
+++ b/app/Utils/Number.php
@@ -25,7 +25,7 @@ class Number
*
* @return float
*/
- public static function roundValue(float $value, int $precision = 2) : float
+ public static function roundValue(float $value, int $precision = 2): float
{
return round($value, $precision, PHP_ROUND_HALF_UP);
}
@@ -38,7 +38,7 @@ class Number
*
* @return string The formatted value
*/
- public static function formatValue($value, $currency) :string
+ public static function formatValue($value, $currency): string
{
$value = floatval($value);
@@ -56,7 +56,7 @@ class Number
*
* @return string The formatted value
*/
- public static function formatValueNoTrailingZeroes($value, $entity) :string
+ public static function formatValueNoTrailingZeroes($value, $entity): string
{
$value = floatval($value);
@@ -133,7 +133,7 @@ class Number
* @param $entity
* @return string The formatted value
*/
- public static function formatMoney($value, $entity) :string
+ public static function formatMoney($value, $entity): string
{
$value = floatval($value);
@@ -198,10 +198,10 @@ class Number
* @param mixed $entity
* @return string The formatted value
*/
- public static function formatMoneyNoRounding($value, $entity) :string
+ public static function formatMoneyNoRounding($value, $entity): string
{
$currency = $entity->currency();
-
+
$_value = $value;
$thousand = $currency->thousand_separator;
@@ -239,7 +239,7 @@ class Number
} elseif ($v < 1) {
$precision = strlen($v) - strrpos($v, '.') - 1;
}
-
+
if (is_array($parts) && $parts[0] != 0) {
$precision = 2;
}
diff --git a/app/Utils/PaymentHtmlEngine.php b/app/Utils/PaymentHtmlEngine.php
index 7c376d20cd43..7e0bdefbb0a7 100644
--- a/app/Utils/PaymentHtmlEngine.php
+++ b/app/Utils/PaymentHtmlEngine.php
@@ -45,20 +45,20 @@ class PaymentHtmlEngine
$this->helpers = new Helpers();
}
- public function setSettings($settings):self
+ public function setSettings($settings): self
{
$this->settings = $settings;
return $this;
}
-
+
public function makePaymentVariables()
{
App::forgetInstance('translator');
$t = app('translator');
App::setLocale($this->contact->preferredLocale());
$t->replace(Ninja::transformTranslations($this->client->getMergedSettings()));
-
+
$data = [];
$data['$from'] = ['value' => '', 'label' => ctrans('texts.from')];
@@ -173,7 +173,7 @@ class PaymentHtmlEngine
$data['$viewButton'] = &$data['$view_link'];
$data['$viewLink'] = &$data['$view_link'];
$data['$paymentLink'] = &$data['$view_link'];
- $data['$portalButton'] = ['value' => $this->buildViewButton($this->payment->getPortalLink(), ctrans('texts.login')), 'label' =>''];
+ $data['$portalButton'] = ['value' => $this->buildViewButton($this->payment->getPortalLink(), ctrans('texts.login')), 'label' => ''];
$data['$portal_url'] = &$data['$portalButton'];
$data['$view_url'] = ['value' => $this->payment->getLink(), 'label' => ctrans('texts.view_payment')];
@@ -203,14 +203,13 @@ class PaymentHtmlEngine
$data['$reference'] = ['value' => '', 'label' => ctrans('texts.reference')];
$data['$total'] = ['value' => '', 'label' => ctrans('texts.total')];
$data['$history'] = ['value' => '', 'label' => ctrans('texts.history')];
-
+
if ($this->payment->status_id == 4) {
$data['$status_logo'] = ['value' => ' ' . ctrans('texts.paid') .'
', 'label' => ''];
} else {
$data['$status_logo'] = ['value' => '', 'label' => ''];
}
-
$arrKeysLength = array_map('strlen', array_keys($data));
array_multisort($arrKeysLength, SORT_DESC, $data);
@@ -289,7 +288,7 @@ class PaymentHtmlEngine
return $invoice_list;
}
- public function makeValues() :array
+ public function makeValues(): array
{
$data = [];
@@ -301,7 +300,7 @@ class PaymentHtmlEngine
return $data;
}
-
+
/**
* generateLabelsAndValues
*
diff --git a/app/Utils/PhantomJS/Phantom.php b/app/Utils/PhantomJS/Phantom.php
index d0acd053b570..524e50b2b928 100644
--- a/app/Utils/PhantomJS/Phantom.php
+++ b/app/Utils/PhantomJS/Phantom.php
@@ -33,7 +33,8 @@ use Illuminate\Support\Str;
class Phantom
{
- use MakesHash, PageNumbering;
+ use MakesHash;
+ use PageNumbering;
/**
* Generate a PDF from the
diff --git a/app/Utils/Statics.php b/app/Utils/Statics.php
index cd6f9bcdd3f6..1fc8e766745d 100644
--- a/app/Utils/Statics.php
+++ b/app/Utils/Statics.php
@@ -65,7 +65,7 @@ class Statics
* @param string|bool $locale The user locale
* @return array Array of statics
*/
- public static function company($locale = false) :array
+ public static function company($locale = false): array
{
$data = [];
diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php
index ef90d1dc3cb7..1db1eaacbbd1 100644
--- a/app/Utils/SystemHealth.php
+++ b/app/Utils/SystemHealth.php
@@ -217,7 +217,7 @@ class SystemHealth
if (!function_exists('exec')) {
return "Unable to check CLI version";
}
-
+
try {
exec('php -v', $foo, $exitCode);
diff --git a/app/Utils/TempFile.php b/app/Utils/TempFile.php
index 9d7fe59ff3d9..a1646dbc6a73 100644
--- a/app/Utils/TempFile.php
+++ b/app/Utils/TempFile.php
@@ -13,7 +13,7 @@ namespace App\Utils;
class TempFile
{
- public static function path($url) :string
+ public static function path($url): string
{
$temp_path = @tempnam(sys_get_temp_dir().'/'.sha1(time()), basename($url));
copy($url, $temp_path);
@@ -22,7 +22,7 @@ class TempFile
}
/* Downloads a file to temp storage and returns the path - used for mailers */
- public static function filePath($data, $filename) :string
+ public static function filePath($data, $filename): string
{
$dir_hash = sys_get_temp_dir().'/'.sha1(microtime());
diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php
index b65392118765..dec33845b82c 100644
--- a/app/Utils/TemplateEngine.php
+++ b/app/Utils/TemplateEngine.php
@@ -323,7 +323,7 @@ class TemplateEngine
'applied' => 10,
'refunded' => 5,
]);
-
+
$this->entity_obj = $payment;
/** @var \App\Models\Invoice $invoice */
@@ -377,7 +377,7 @@ class TemplateEngine
'company_id' => $user->company()->id,
'client_id' => $client->id,
]);
-
+
$this->entity_obj = $quote;
$invitation = QuoteInvitation::factory()->create([
@@ -403,14 +403,14 @@ class TemplateEngine
'is_primary' => 1,
'send_email' => true,
]);
-
+
/** @var \App\Models\PurchaseOrder $purchase_order **/
$purchase_order = PurchaseOrder::factory()->create([
'user_id' => $user->id,
'company_id' => $user->company()->id,
'vendor_id' => $vendor->id,
]);
-
+
$this->entity_obj = $purchase_order;
/** @var \App\Models\PurchaseOrderInvitation $invitation **/
diff --git a/app/Utils/Traits/ChecksEntityStatus.php b/app/Utils/Traits/ChecksEntityStatus.php
index 64aa9bc8f375..c44cc4fe7b34 100644
--- a/app/Utils/Traits/ChecksEntityStatus.php
+++ b/app/Utils/Traits/ChecksEntityStatus.php
@@ -23,6 +23,6 @@ trait ChecksEntityStatus
public function disallowUpdate()
{
- return response()->json(['message'=>'Record is deleted and cannot be edited. Restore the record to enable editing'], 400);
+ return response()->json(['message' => 'Record is deleted and cannot be edited. Restore the record to enable editing'], 400);
}
}
diff --git a/app/Utils/Traits/CleanLineItems.php b/app/Utils/Traits/CleanLineItems.php
index 8ccb07d02922..2a734b106c90 100644
--- a/app/Utils/Traits/CleanLineItems.php
+++ b/app/Utils/Traits/CleanLineItems.php
@@ -19,7 +19,7 @@ use App\DataMapper\InvoiceItem;
*/
trait CleanLineItems
{
- public function cleanItems($items) :array
+ public function cleanItems($items): array
{
if (! isset($items) || ! is_array($items)) {
return [];
@@ -65,15 +65,15 @@ trait CleanLineItems
if (! array_key_exists('tax_id', $item)) {
$item['tax_id'] = '1';
} elseif(array_key_exists('tax_id', $item) && $item['tax_id'] == '') {
-
+
if($item['type_id'] == '2') {
$item['tax_id'] = '2';
} else {
$item['tax_id'] = '1';
}
-
+
}
-
+
}
if (array_key_exists('id', $item) || array_key_exists('_id', $item)) {
diff --git a/app/Utils/Traits/ClientGroupSettingsSaver.php b/app/Utils/Traits/ClientGroupSettingsSaver.php
index 2d32b3468417..f5311cc71ddb 100644
--- a/app/Utils/Traits/ClientGroupSettingsSaver.php
+++ b/app/Utils/Traits/ClientGroupSettingsSaver.php
@@ -156,7 +156,7 @@ trait ClientGroupSettingsSaver
* @param array $settings The settings request() array
* @return stdClass stdClass object
*/
- private function checkSettingType($settings) : stdClass
+ private function checkSettingType($settings): stdClass
{
$settings = (object) $settings;
$casts = CompanySettings::$casts;
@@ -216,7 +216,7 @@ trait ClientGroupSettingsSaver
* @param string $value The object property
* @return bool TRUE if the property is the expected type
*/
- private function checkAttribute($key, $value) :bool
+ private function checkAttribute($key, $value): bool
{
switch ($key) {
case 'int':
diff --git a/app/Utils/Traits/CompanyGatewayFeesAndLimitsSaver.php b/app/Utils/Traits/CompanyGatewayFeesAndLimitsSaver.php
index d5b664824890..edcfd783e6c0 100644
--- a/app/Utils/Traits/CompanyGatewayFeesAndLimitsSaver.php
+++ b/app/Utils/Traits/CompanyGatewayFeesAndLimitsSaver.php
@@ -53,7 +53,7 @@ trait CompanyGatewayFeesAndLimitsSaver
* @param string $value The object property
* @return bool TRUE if the property is the expected type
*/
- private function checkAttribute($key, $value) :bool
+ private function checkAttribute($key, $value): bool
{
switch ($key) {
case 'int':
@@ -87,7 +87,7 @@ trait CompanyGatewayFeesAndLimitsSaver
$new_arr = [];
foreach ($fees_and_limits as $key => $value) {
- $fal = new FeesAndLimits;
+ $fal = new FeesAndLimits();
// $fal->{$key} = $value;
foreach ($value as $k => $v) {
diff --git a/app/Utils/Traits/CompanySettingsSaver.php b/app/Utils/Traits/CompanySettingsSaver.php
index 043d8db5c93f..63a1d5b6cdb4 100644
--- a/app/Utils/Traits/CompanySettingsSaver.php
+++ b/app/Utils/Traits/CompanySettingsSaver.php
@@ -27,7 +27,6 @@ use stdClass;
*/
trait CompanySettingsSaver
{
-
private array $string_ids = [
'payment_refund_design_id',
'payment_receipt_design_id',
@@ -89,18 +88,18 @@ trait CompanySettingsSaver
if($entity?->calculate_taxes && $company_settings->country_id == "840" && array_key_exists('settings', $entity->getDirty()) && !$entity?->account->isFreeHostedClient()) {
$old_settings = $entity->getOriginal()['settings'];
-
+
/** Monitor changes of the Postal code */
if($old_settings->postal_code != $company_settings->postal_code) {
CompanyTaxRate::dispatch($entity);
}
-
-
+
+
} elseif($entity?->calculate_taxes && $company_settings->country_id == "840" && array_key_exists('calculate_taxes', $entity->getDirty()) && $entity->getOriginal('calculate_taxes') == 0 && !$entity?->account->isFreeHostedClient()) {
CompanyTaxRate::dispatch($entity);
}
-
-
+
+
$entity->save();
}
@@ -178,7 +177,7 @@ trait CompanySettingsSaver
* @param array $settings The settings request() array
* @return stdClass stdClass object
*/
- private function checkSettingType($settings) : stdClass
+ private function checkSettingType($settings): stdClass
{
$settings = (object) $settings;
@@ -207,7 +206,7 @@ trait CompanySettingsSaver
$value = 'integer';
if(in_array($key, $this->string_ids)) {
- $value ='string';
+ $value = 'string';
}
// if ($key == 'gmail_sending_user_id') {
@@ -266,7 +265,7 @@ trait CompanySettingsSaver
* @param string $value The object property
* @return bool TRUE if the property is the expected type
*/
- private function checkAttribute($key, $value) :bool
+ private function checkAttribute($key, $value): bool
{
switch ($key) {
case 'int':
diff --git a/app/Utils/Traits/DesignCalculator.php b/app/Utils/Traits/DesignCalculator.php
index 83bf016a13d3..9f11d04cc0a3 100644
--- a/app/Utils/Traits/DesignCalculator.php
+++ b/app/Utils/Traits/DesignCalculator.php
@@ -60,7 +60,7 @@ trait DesignCalculator
if ($default_design_id == 'recurring_invoice_design_id') {
$default_design_id = 'invoice_design_id';
}
-
+
$design_id = $this->settings->{$default_design_id};
if (array_key_exists($design_id, $design_map)) {
diff --git a/app/Utils/Traits/GeneratesConvertedQuoteCounter.php b/app/Utils/Traits/GeneratesConvertedQuoteCounter.php
index 314b994e1ba0..0e43c8d68414 100644
--- a/app/Utils/Traits/GeneratesConvertedQuoteCounter.php
+++ b/app/Utils/Traits/GeneratesConvertedQuoteCounter.php
@@ -53,7 +53,7 @@ trait GeneratesConvertedQuoteCounter
return $this->getNextEntityNumber($invoice, $client, intval($counter));
}
- private function getNextEntityNumber($invoice, Client $client, $counter='')
+ private function getNextEntityNumber($invoice, Client $client, $counter = '')
{
$settings = $client->getMergedSettings();
@@ -157,7 +157,7 @@ trait GeneratesConvertedQuoteCounter
* @param Invoice|null $invoice
* @return string The next invoice number.
*/
- public function getNextInvoiceNumber(Client $client, ?Invoice $invoice, $is_recurring = false) :string
+ public function getNextInvoiceNumber(Client $client, ?Invoice $invoice, $is_recurring = false): string
{
$entity_number = $this->getNextEntityNumber(Invoice::class, $client, $is_recurring);
@@ -171,7 +171,7 @@ trait GeneratesConvertedQuoteCounter
*
* @return string The next credit number.
*/
- public function getNextCreditNumber(Client $client, ?Credit $credit) :string
+ public function getNextCreditNumber(Client $client, ?Credit $credit): string
{
$entity_number = $this->getNextEntityNumber(Credit::class, $client);
@@ -213,7 +213,7 @@ trait GeneratesConvertedQuoteCounter
*
* @return string The next payment number.
*/
- public function getNextPaymentNumber(Client $client, ?Payment $payment) :string
+ public function getNextPaymentNumber(Client $client, ?Payment $payment): string
{
$entity_number = $this->getNextEntityNumber(Payment::class, $client);
@@ -228,7 +228,7 @@ trait GeneratesConvertedQuoteCounter
* @return string The next client number.
* @throws \Exception
*/
- public function getNextClientNumber(Client $client) :string
+ public function getNextClientNumber(Client $client): string
{
//Reset counters if enabled
$this->resetCounters($client);
@@ -251,7 +251,7 @@ trait GeneratesConvertedQuoteCounter
* @param Vendor $vendor The vendor
* @return string The next vendor number.
*/
- public function getNextVendorNumber(Vendor $vendor) :string
+ public function getNextVendorNumber(Vendor $vendor): string
{
$this->resetCompanyCounters($vendor->company);
@@ -272,7 +272,7 @@ trait GeneratesConvertedQuoteCounter
* @param Project $project
* @return string The project number
*/
- public function getNextProjectNumber(Project $project) :string
+ public function getNextProjectNumber(Project $project): string
{
$entity_number = $this->getNextEntityNumber(Project::class, $project->client, false);
@@ -285,7 +285,7 @@ trait GeneratesConvertedQuoteCounter
* @param Task $task The task
* @return string The next task number.
*/
- public function getNextTaskNumber(Task $task) :string
+ public function getNextTaskNumber(Task $task): string
{
$this->resetCompanyCounters($task->company);
@@ -307,7 +307,7 @@ trait GeneratesConvertedQuoteCounter
* @param Expense $expense The expense
* @return string The next expense number.
*/
- public function getNextExpenseNumber(Expense $expense) :string
+ public function getNextExpenseNumber(Expense $expense): string
{
$this->resetCompanyCounters($expense->company);
@@ -329,7 +329,7 @@ trait GeneratesConvertedQuoteCounter
* @param RecurringExpense $expense The expense
* @return string The next expense number.
*/
- public function getNextRecurringExpenseNumber(RecurringExpense $expense) :string
+ public function getNextRecurringExpenseNumber(RecurringExpense $expense): string
{
$this->resetCompanyCounters($expense->company);
@@ -361,7 +361,7 @@ trait GeneratesConvertedQuoteCounter
*
* @return bool True if has shared counter, False otherwise.
*/
- public function hasSharedCounter(Client $client, string $type = 'quote') : bool
+ public function hasSharedCounter(Client $client, string $type = 'quote'): bool
{
if ($type == 'quote') {
return (bool) $client->getSetting('shared_invoice_quote_counter');
@@ -409,7 +409,7 @@ trait GeneratesConvertedQuoteCounter
}
/*Check if a number is available for use. */
- public function checkNumberAvailable($class, $entity, $number) :bool
+ public function checkNumberAvailable($class, $entity, $number): bool
{
if ($entity = $class::whereCompanyId($entity->company_id)->whereNumber($number)->withTrashed()->exists()) {
return false;
@@ -424,7 +424,7 @@ trait GeneratesConvertedQuoteCounter
* @param $entity
* @param string $counter_name The counter name
*/
- private function incrementCounter($entity, string $counter_name) :void
+ private function incrementCounter($entity, string $counter_name): void
{
$settings = $entity->settings;
@@ -443,7 +443,7 @@ trait GeneratesConvertedQuoteCounter
$entity->save();
}
- private function prefixCounter($counter, $prefix) : string
+ private function prefixCounter($counter, $prefix): string
{
if (strlen($prefix) == 0) {
return $counter;
@@ -460,7 +460,7 @@ trait GeneratesConvertedQuoteCounter
*
* @return string the padded counter
*/
- private function padCounter($counter, $padding) :string
+ private function padCounter($counter, $padding): string
{
return str_pad($counter, $padding, '0', STR_PAD_LEFT);
}
@@ -618,7 +618,7 @@ trait GeneratesConvertedQuoteCounter
*
* @return string The formatted number pattern
*/
- private function applyNumberPattern($entity, string $counter, $pattern) :string
+ private function applyNumberPattern($entity, string $counter, $pattern): string
{
if (! $pattern) {
return $counter;
diff --git a/app/Utils/Traits/GeneratesCounter.php b/app/Utils/Traits/GeneratesCounter.php
index bf49f5438cad..883ac1ddd2c4 100644
--- a/app/Utils/Traits/GeneratesCounter.php
+++ b/app/Utils/Traits/GeneratesCounter.php
@@ -124,7 +124,7 @@ trait GeneratesCounter
switch ($entity) {
case Invoice::class:
return 'invoice_number_counter';
-
+
case Quote::class:
if ($this->hasSharedCounter($client, 'quote')) {
@@ -132,29 +132,29 @@ trait GeneratesCounter
}
return 'quote_number_counter';
-
+
case RecurringInvoice::class:
return 'recurring_invoice_number_counter';
-
+
case RecurringQuote::class:
return 'recurring_quote_number_counter';
-
+
case RecurringExpense::class:
return 'recurring_expense_number_counter';
-
+
case Payment::class:
return 'payment_number_counter';
-
+
case Credit::class:
if ($this->hasSharedCounter($client, 'credit')) {
return 'invoice_number_counter';
}
return 'credit_number_counter';
-
+
case Project::class:
return 'project_number_counter';
-
+
case PurchaseOrder::class:
return 'purchase_order_number_counter';
@@ -171,7 +171,7 @@ trait GeneratesCounter
* @param Invoice|null $invoice
* @return string The next invoice number.
*/
- public function getNextInvoiceNumber(Client $client, ?Invoice $invoice, $is_recurring = false) :string
+ public function getNextInvoiceNumber(Client $client, ?Invoice $invoice, $is_recurring = false): string
{
$entity_number = $this->getNextEntityNumber(Invoice::class, $client, $is_recurring);
@@ -185,7 +185,7 @@ trait GeneratesCounter
*
* @return string The next credit number.
*/
- public function getNextCreditNumber(Client $client, ?Credit $credit) :string
+ public function getNextCreditNumber(Client $client, ?Credit $credit): string
{
$entity_number = $this->getNextEntityNumber(Credit::class, $client);
@@ -227,7 +227,7 @@ trait GeneratesCounter
*
* @return string The next payment number.
*/
- public function getNextPaymentNumber(Client $client, ?Payment $payment) :string
+ public function getNextPaymentNumber(Client $client, ?Payment $payment): string
{
$entity_number = $this->getNextEntityNumber(Payment::class, $client);
@@ -242,7 +242,7 @@ trait GeneratesCounter
* @return string The next client number.
* @throws \Exception
*/
- public function getNextClientNumber(Client $client) :string
+ public function getNextClientNumber(Client $client): string
{
//Reset counters if enabled
$this->resetCounters($client);
@@ -265,7 +265,7 @@ trait GeneratesCounter
* @param Vendor $vendor The vendor
* @return string The next vendor number.
*/
- public function getNextVendorNumber(Vendor $vendor) :string
+ public function getNextVendorNumber(Vendor $vendor): string
{
$this->resetCompanyCounters($vendor->company);
@@ -286,7 +286,7 @@ trait GeneratesCounter
* @param Project $project
* @return string The project number
*/
- public function getNextProjectNumber(Project $project) :string
+ public function getNextProjectNumber(Project $project): string
{
$entity_number = $this->getNextEntityNumber(Project::class, $project->client, false);
@@ -299,7 +299,7 @@ trait GeneratesCounter
* @param Task $task The task
* @return string The next task number.
*/
- public function getNextTaskNumber(Task $task) :string
+ public function getNextTaskNumber(Task $task): string
{
$this->resetCompanyCounters($task->company);
@@ -321,7 +321,7 @@ trait GeneratesCounter
* @param Expense $expense The expense
* @return string The next expense number.
*/
- public function getNextExpenseNumber(Expense $expense) :string
+ public function getNextExpenseNumber(Expense $expense): string
{
$this->resetCompanyCounters($expense->company);
@@ -337,7 +337,7 @@ trait GeneratesCounter
return $this->replaceUserVars($expense, $entity_number);
}
- public function getNextPurchaseOrderNumber(PurchaseOrder $purchase_order) :string
+ public function getNextPurchaseOrderNumber(PurchaseOrder $purchase_order): string
{
$this->resetCompanyCounters($purchase_order->company);
@@ -359,7 +359,7 @@ trait GeneratesCounter
* @param RecurringExpense $expense The expense
* @return string The next expense number.
*/
- public function getNextRecurringExpenseNumber(RecurringExpense $expense) :string
+ public function getNextRecurringExpenseNumber(RecurringExpense $expense): string
{
$this->resetCompanyCounters($expense->company);
@@ -391,7 +391,7 @@ trait GeneratesCounter
*
* @return bool True if has shared counter, False otherwise.
*/
- public function hasSharedCounter(Client $client, string $type = 'quote') : bool
+ public function hasSharedCounter(Client $client, string $type = 'quote'): bool
{
if ($type == 'quote') {
return (bool) $client->getSetting('shared_invoice_quote_counter');
@@ -413,7 +413,7 @@ trait GeneratesCounter
* @param string $prefix
* @return string The padded and prefixed entity number
*/
- private function checkEntityNumber($class, $entity, $counter, $padding, $pattern, $prefix = '') :string
+ private function checkEntityNumber($class, $entity, $counter, $padding, $pattern, $prefix = ''): string
{
$check = false;
$check_counter = 1;
@@ -443,7 +443,7 @@ trait GeneratesCounter
}
/*Check if a number is available for use. */
- public function checkNumberAvailable($class, $entity, $number) :bool
+ public function checkNumberAvailable($class, $entity, $number): bool
{
if ($entity = $class::whereCompanyId($entity->company_id)->whereNumber($number)->withTrashed()->exists()) {
return false;
@@ -458,7 +458,7 @@ trait GeneratesCounter
* @param $entity
* @param string $counter_name The counter name
*/
- private function incrementCounter($entity, string $counter_name) :void
+ private function incrementCounter($entity, string $counter_name): void
{
$settings = $entity->settings;
@@ -478,7 +478,7 @@ trait GeneratesCounter
$entity->save();
}
- private function prefixCounter($counter, $prefix) : string
+ private function prefixCounter($counter, $prefix): string
{
if (strlen($prefix) == 0) {
return $counter;
@@ -495,7 +495,7 @@ trait GeneratesCounter
*
* @return string the padded counter
*/
- private function padCounter($counter, $padding) :string
+ private function padCounter($counter, $padding): string
{
return str_pad($counter, $padding, '0', STR_PAD_LEFT);
}
@@ -682,7 +682,7 @@ trait GeneratesCounter
*
* @return string The formatted number pattern
*/
- private function applyNumberPattern($entity, string $counter, $pattern) :string
+ private function applyNumberPattern($entity, string $counter, $pattern): string
{
if (! $pattern) {
return $counter;
diff --git a/app/Utils/Traits/Inviteable.php b/app/Utils/Traits/Inviteable.php
index d21e6d055201..5990c7e3da0d 100644
--- a/app/Utils/Traits/Inviteable.php
+++ b/app/Utils/Traits/Inviteable.php
@@ -28,7 +28,7 @@ trait Inviteable
*
* @return string The status.
*/
- public function getStatus() :string
+ public function getStatus(): string
{
$status = '';
@@ -86,7 +86,7 @@ trait Inviteable
return $domain.'/client/unsubscribe/'.$entity_type.'/'.$this->key;
}
- public function getLink() :string
+ public function getLink(): string
{
$entity_type = Str::snake(class_basename($this->entityType()));
@@ -113,7 +113,7 @@ trait Inviteable
}
}
- public function getPortalLink() :string
+ public function getPortalLink(): string
{
if (Ninja::isHosted()) {
$domain = $this->company->domain();
@@ -138,7 +138,7 @@ trait Inviteable
}
}
- public function getAdminLink($use_react_link = false) :string
+ public function getAdminLink($use_react_link = false): string
{
return $use_react_link ? $this->getReactLink() : $this->getLink().'?silent=true';
}
diff --git a/app/Utils/Traits/Invoice/ActionsInvoice.php b/app/Utils/Traits/Invoice/ActionsInvoice.php
index 0ed140d5b320..a533abb30b03 100644
--- a/app/Utils/Traits/Invoice/ActionsInvoice.php
+++ b/app/Utils/Traits/Invoice/ActionsInvoice.php
@@ -15,7 +15,7 @@ use App\Models\Invoice;
trait ActionsInvoice
{
- public function invoiceDeletable($invoice) :bool
+ public function invoiceDeletable($invoice): bool
{
if ($invoice->status_id <= Invoice::STATUS_SENT &&
$invoice->is_deleted == false &&
@@ -27,7 +27,7 @@ trait ActionsInvoice
return false;
}
- public function invoiceCancellable($invoice) :bool
+ public function invoiceCancellable($invoice): bool
{
if (($invoice->status_id == Invoice::STATUS_SENT ||
$invoice->status_id == Invoice::STATUS_PARTIAL) &&
@@ -39,7 +39,7 @@ trait ActionsInvoice
return false;
}
- public function invoiceReversable($invoice) :bool
+ public function invoiceReversable($invoice): bool
{
if (($invoice->status_id == Invoice::STATUS_SENT ||
$invoice->status_id == Invoice::STATUS_PARTIAL ||
diff --git a/app/Utils/Traits/MakesDates.php b/app/Utils/Traits/MakesDates.php
index a33afbd19fde..43aa5231f491 100644
--- a/app/Utils/Traits/MakesDates.php
+++ b/app/Utils/Traits/MakesDates.php
@@ -57,7 +57,7 @@ trait MakesDates
* @param string $format The date display format
* @return string The formatted date
*/
- public function formatDate($date, string $format) :string
+ public function formatDate($date, string $format): string
{
if (! isset($date)) {
return '';
@@ -76,7 +76,7 @@ trait MakesDates
* @param string $format The date display format
* @return string The formatted date
*/
- public function formatDatetime($date, string $format) :string
+ public function formatDatetime($date, string $format): string
{
return Carbon::createFromTimestamp($date)->format($format.' g:i a');
}
@@ -87,7 +87,7 @@ trait MakesDates
* @param string $format The date display format
* @return string The formatted date
*/
- public function formatDateTimestamp($timestamp, string $format) :string
+ public function formatDateTimestamp($timestamp, string $format): string
{
return Carbon::createFromTimestamp($timestamp)->format($format);
}
@@ -130,7 +130,7 @@ trait MakesDates
if(now()->lt($fin_year_start)) {
$fin_year_start->subYearNoOverflow();
}
-
+
}
//override for financial years
@@ -143,7 +143,7 @@ trait MakesDates
if(now()->subYear()->lt($fin_year_start)) {
$fin_year_start->subYearNoOverflow();
}
-
+
}
diff --git a/app/Utils/Traits/MakesHash.php b/app/Utils/Traits/MakesHash.php
index dc8d6d158a40..f458ca0ccf60 100644
--- a/app/Utils/Traits/MakesHash.php
+++ b/app/Utils/Traits/MakesHash.php
@@ -24,7 +24,7 @@ trait MakesHash
* Creates a simple alphanumeric Hash.
* @return string - asd89f7as89df6asf78as6fds
*/
- public function createHash() : string
+ public function createHash(): string
{
return Str::random(config('ninja.key_length'));
}
@@ -35,7 +35,7 @@ trait MakesHash
* @param $db - Full database name
* @return string 01-asfas8df76a78f6a78dfsdf
*/
- public function createDbHash($db) : string
+ public function createDbHash($db): string
{
if (config('ninja.db.multi_db_enabled')) {
return $this->getDbCode($db).'-'.Str::random(config('ninja.key_length'));
@@ -48,14 +48,14 @@ trait MakesHash
* @param $db - Full database name
* @return string - hashed and encoded int 01,02,03,04
*/
- public function getDbCode($db) : string
+ public function getDbCode($db): string
{
$hashids = new Hashids(config('ninja.hash_salt'), 10);
return $hashids->encode(str_replace(MultiDB::DB_PREFIX, '', $db));
}
- public function encodePrimaryKey($value) : string
+ public function encodePrimaryKey($value): string
{
$hashids = new Hashids(config('ninja.hash_salt'), 10);
@@ -79,7 +79,7 @@ trait MakesHash
}
} catch (\Exception $e) {
- return response()->json(['error'=>'Invalid primary key'], 400);
+ return response()->json(['error' => 'Invalid primary key'], 400);
}
/*
diff --git a/app/Utils/Traits/MakesHeaderData.php b/app/Utils/Traits/MakesHeaderData.php
index 4345e3da4d2d..81788381bb13 100644
--- a/app/Utils/Traits/MakesHeaderData.php
+++ b/app/Utils/Traits/MakesHeaderData.php
@@ -21,7 +21,7 @@ trait MakesHeaderData
/**
* @return array
*/
- public function headerData() : array
+ public function headerData(): array
{
//companies
$companies = auth()->user()->companies;
diff --git a/app/Utils/Traits/MakesInvoiceHtml.php b/app/Utils/Traits/MakesInvoiceHtml.php
index dc8889dda85f..1359640f7d5b 100644
--- a/app/Utils/Traits/MakesInvoiceHtml.php
+++ b/app/Utils/Traits/MakesInvoiceHtml.php
@@ -22,7 +22,7 @@ use Throwable;
*/
trait MakesInvoiceHtml
{
- private function parseLabelsAndValues($labels, $values, $section) :string
+ private function parseLabelsAndValues($labels, $values, $section): string
{
$section = strtr($section, $labels);
$section = strtr($section, $values);
@@ -38,7 +38,7 @@ trait MakesInvoiceHtml
* @return string The return HTML string
* @throws FatalThrowableError
*/
- public function renderView($string, $data = []) :string
+ public function renderView($string, $data = []): string
{
$data['__env'] = app(Factory::class);
diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php
index 764be096900b..a3d7c3de448d 100644
--- a/app/Utils/Traits/MakesInvoiceValues.php
+++ b/app/Utils/Traits/MakesInvoiceValues.php
@@ -81,7 +81,7 @@ trait MakesInvoiceValues
return '';
}
- public function makeLabels($contact = null) :array
+ public function makeLabels($contact = null): array
{
$data = [];
@@ -102,7 +102,7 @@ trait MakesInvoiceValues
* @return array returns an array
* of keyed labels (appended with _label)
*/
- public function makeValues($contact = null) :array
+ public function makeValues($contact = null): array
{
$data = [];
@@ -120,7 +120,7 @@ trait MakesInvoiceValues
* @param array $columns The array (or string of column headers)
* @return string injectable HTML string
*/
- public function buildTableHeader($columns) :?string
+ public function buildTableHeader($columns): ?string
{
$data = $this->makeLabels();
@@ -144,7 +144,7 @@ trait MakesInvoiceValues
* @param string $table_prefix
* @return string injectable HTML string
*/
- public function buildTableBody(array $default_columns, $user_columns, string $table_prefix) :?string
+ public function buildTableBody(array $default_columns, $user_columns, string $table_prefix): ?string
{
$items = $this->transformLineItems($this->line_items, $table_prefix);
@@ -189,7 +189,7 @@ trait MakesInvoiceValues
* @param array $columns The column header values
* @return array The new column header variables
*/
- private function transformColumnsForHeader(array $columns) :array
+ private function transformColumnsForHeader(array $columns): array
{
if (count($columns) == 0) {
return [];
@@ -221,7 +221,7 @@ trait MakesInvoiceValues
* @param array $columns The column header values
* @return array The invoice variables
*/
- private function transformColumnsForLineItems(array $columns) :array
+ private function transformColumnsForLineItems(array $columns): array
{
/* Removes any invalid columns the user has entered. */
$columns = array_intersect($columns, self::$master_columns);
@@ -258,7 +258,7 @@ trait MakesInvoiceValues
*
* @return array
*/
- public function transformLineItems($items, $table_type = '$product') :array
+ public function transformLineItems($items, $table_type = '$product'): array
{ //$start = microtime(true);
$entity = $this->client ? $this->client : $this->vendor;
@@ -366,7 +366,7 @@ trait MakesInvoiceValues
}
//nlog(microtime(true) - $start);
-
+
return $data;
}
@@ -379,7 +379,7 @@ trait MakesInvoiceValues
* @return string a collection of
rows with line item
* aggregate data
*/
- private function makeLineTaxes() :string
+ private function makeLineTaxes(): string
{
$tax_map = $this->calc()->getTaxMap();
$entity = $this->client ? $this->client : $this->vendor;
@@ -399,7 +399,7 @@ trait MakesInvoiceValues
* @return string a collectino of
with
* itemised total tax data
*/
- private function makeTotalTaxes() :string
+ private function makeTotalTaxes(): string
{
$data = '';
$entity = $this->client ? $this->client : $this->vendor;
@@ -417,7 +417,7 @@ trait MakesInvoiceValues
return $data;
}
- private function totalTaxLabels() :string
+ private function totalTaxLabels(): string
{
$data = '';
@@ -432,7 +432,7 @@ trait MakesInvoiceValues
return $data;
}
- private function totalTaxValues() :string
+ private function totalTaxValues(): string
{
$data = '';
$entity = $this->client ? $this->client : $this->vendor;
@@ -448,7 +448,7 @@ trait MakesInvoiceValues
return $data;
}
- private function lineTaxLabels() :string
+ private function lineTaxLabels(): string
{
$tax_map = $this->calc()->getTaxMap();
@@ -461,7 +461,7 @@ trait MakesInvoiceValues
return $data;
}
- private function lineTaxValues() :string
+ private function lineTaxValues(): string
{
$tax_map = $this->calc()->getTaxMap();
$entity = $this->client ? $this->client : $this->vendor;
@@ -489,7 +489,7 @@ trait MakesInvoiceValues
* of Repeating headers and footers on the PDF.
* @return string The css string
*/
- public function generateCustomCSS() :string
+ public function generateCustomCSS(): string
{
$settings = $this->client ? $this->client->getMergedSettings() : $this->company->settings;
diff --git a/app/Utils/Traits/MakesMenu.php b/app/Utils/Traits/MakesMenu.php
index 2c284d8bd6f3..bca4b9768f86 100644
--- a/app/Utils/Traits/MakesMenu.php
+++ b/app/Utils/Traits/MakesMenu.php
@@ -23,7 +23,7 @@ trait MakesMenu
* @param string $entity Class name
* @return array of modules
*/
- public function makeEntityTabMenu(string $entity) : array
+ public function makeEntityTabMenu(string $entity): array
{
$tabs = [];
diff --git a/app/Utils/Traits/MakesReminders.php b/app/Utils/Traits/MakesReminders.php
index 4ef6a7368322..d73ec2ea773e 100644
--- a/app/Utils/Traits/MakesReminders.php
+++ b/app/Utils/Traits/MakesReminders.php
@@ -80,7 +80,7 @@ trait MakesReminders
}
- private function checkEndlessReminder($last_sent_date, $endless_reminder_frequency_id) :bool
+ private function checkEndlessReminder($last_sent_date, $endless_reminder_frequency_id): bool
{
if (Carbon::now()->startOfDay()->eq($this->addTimeInterval($last_sent_date, $endless_reminder_frequency_id))) {
return true;
@@ -89,7 +89,7 @@ trait MakesReminders
return false;
}
- private function addTimeInterval($date, $endless_reminder_frequency_id) :?Carbon
+ private function addTimeInterval($date, $endless_reminder_frequency_id): ?Carbon
{
if (! $date) {
return null;
diff --git a/app/Utils/Traits/MakesTemplateData.php b/app/Utils/Traits/MakesTemplateData.php
index 8658e39562ae..91112e106ee3 100644
--- a/app/Utils/Traits/MakesTemplateData.php
+++ b/app/Utils/Traits/MakesTemplateData.php
@@ -16,7 +16,7 @@ namespace App\Utils\Traits;
*/
trait MakesTemplateData
{
- public function makeFakerLabels() :array
+ public function makeFakerLabels(): array
{
$data = [];
@@ -36,7 +36,7 @@ trait MakesTemplateData
* @return array returns an array
* of keyed labels (appended with _label)
*/
- public function makeFakerValues() :array
+ public function makeFakerValues(): array
{
$data = [];
@@ -227,7 +227,7 @@ trait MakesTemplateData
$data['$vendor.postal_city'] = &$data['$postal_city'];
$data['$vendor.country'] = &$data['$country'];
$data['$vendor.email'] = &$data['$email'];
-
+
$data['$vendor.billing_address1'] = &$data['$vendor.address1'];
$data['$vendor.billing_address2'] = &$data['$vendor.address2'];
$data['$vendor.billing_city'] = &$data['$vendor.city'];
diff --git a/app/Utils/Traits/Notifications/UserNotifies.php b/app/Utils/Traits/Notifications/UserNotifies.php
index 153a9d65d21a..dbc871badab1 100644
--- a/app/Utils/Traits/Notifications/UserNotifies.php
+++ b/app/Utils/Traits/Notifications/UserNotifies.php
@@ -28,7 +28,7 @@ use App\Models\Quote;
*/
trait UserNotifies
{
- public function findUserNotificationTypes($invitation, $company_user, $entity_name, $required_permissions) :array
+ public function findUserNotificationTypes($invitation, $company_user, $entity_name, $required_permissions): array
{
$notifiable_methods = [];
$notifications = $company_user->notifications;
@@ -43,7 +43,7 @@ trait UserNotifies
//if a user owns this record or is assigned to it, they are attached the permission for notification.
if ($invitation->{$entity_name}->user_id == $company_user->user_id || $invitation->{$entity_name}->assigned_user_id == $company_user->user_id) {
-
+
} else {
$required_permissions = $this->removeSpecialUserPermissionForEntity($invitation->{$entity_name}, $required_permissions);
}
@@ -55,7 +55,7 @@ trait UserNotifies
return $notifiable_methods;
}
- public function findUserEntityNotificationType($entity, $company_user, array $required_permissions) :array
+ public function findUserEntityNotificationType($entity, $company_user, array $required_permissions): array
{
$notifiable_methods = [];
$notifications = $company_user->notifications;
@@ -81,7 +81,7 @@ trait UserNotifies
return $notifiable_methods;
}
- private function addSpecialUserPermissionForEntity($entity, array $required_permissions) :array
+ private function addSpecialUserPermissionForEntity($entity, array $required_permissions): array
{
return array_merge($required_permissions, ['all_notifications', 'all_user_notifications']);
}
@@ -109,7 +109,7 @@ trait UserNotifies
}
}
- public function findCompanyUserNotificationType($company_user, $required_permissions) :array
+ public function findCompanyUserNotificationType($company_user, $required_permissions): array
{
if ($company_user->company->is_disabled ||
$company_user->trashed() ||
diff --git a/app/Utils/Traits/NumberFormatter.php b/app/Utils/Traits/NumberFormatter.php
index e2ea72649e10..64cad0124296 100644
--- a/app/Utils/Traits/NumberFormatter.php
+++ b/app/Utils/Traits/NumberFormatter.php
@@ -36,7 +36,7 @@ trait NumberFormatter
* @param string $value The value
* @return float Consumable float value
*/
- private function parseFloat($value) : float
+ private function parseFloat($value): float
{
// check for comma as decimal separator
if (preg_match('/,[\d]{1,2}$/', $value)) {
diff --git a/app/Utils/Traits/Payment/Refundable.php b/app/Utils/Traits/Payment/Refundable.php
index 7a7098bb0684..24567841349c 100644
--- a/app/Utils/Traits/Payment/Refundable.php
+++ b/app/Utils/Traits/Payment/Refundable.php
@@ -200,7 +200,7 @@ trait Refundable
private function createActivity(array $data, int $credit_id)
{
- $fields = new stdClass;
+ $fields = new stdClass();
$activity_repo = new ActivityRepository();
$fields->payment_id = $this->id;
@@ -221,7 +221,7 @@ trait Refundable
}
}
- private function buildCreditNote(array $data) :?Credit
+ private function buildCreditNote(array $data): ?Credit
{
$credit_note = CreditFactory::create($this->company_id, $this->user_id);
$credit_note->assigned_user_id = isset($this->assigned_user_id) ?: null;
diff --git a/app/Utils/Traits/SettingsSaver.php b/app/Utils/Traits/SettingsSaver.php
index 71877bad3161..07f84fc240a1 100644
--- a/app/Utils/Traits/SettingsSaver.php
+++ b/app/Utils/Traits/SettingsSaver.php
@@ -99,7 +99,7 @@ trait SettingsSaver
* @param string $value The object property
* @return bool TRUE if the property is the expected type
*/
- private function checkAttribute($key, $value) :bool
+ private function checkAttribute($key, $value): bool
{
switch ($key) {
case 'int':
diff --git a/app/Utils/Traits/SubscriptionHooker.php b/app/Utils/Traits/SubscriptionHooker.php
index df03068464b7..ee286a949423 100644
--- a/app/Utils/Traits/SubscriptionHooker.php
+++ b/app/Utils/Traits/SubscriptionHooker.php
@@ -51,7 +51,7 @@ trait SubscriptionHooker
return array_merge($body, json_decode($response->getBody(), true));
} catch (ClientException $e) {
$message = $e->getMessage();
-
+
$error = json_decode($e->getResponse()->getBody()->getContents());
if (is_null($error)) {
diff --git a/app/Utils/Traits/UserSessionAttributes.php b/app/Utils/Traits/UserSessionAttributes.php
index 3f9df0007aab..e94231b11bf3 100644
--- a/app/Utils/Traits/UserSessionAttributes.php
+++ b/app/Utils/Traits/UserSessionAttributes.php
@@ -19,7 +19,7 @@ trait UserSessionAttributes
/**
* @param $value
*/
- public function setCurrentCompanyId($value) : void
+ public function setCurrentCompanyId($value): void
{
session(['current_company_id' => $value]);
}
@@ -27,7 +27,7 @@ trait UserSessionAttributes
/**
* @return int
*/
- public function getCurrentCompanyId() : int
+ public function getCurrentCompanyId(): int
{
return session('current_company_id');
}
diff --git a/app/Utils/Traits/UserSettings.php b/app/Utils/Traits/UserSettings.php
index 654b241a4b1f..944f46e01b77 100644
--- a/app/Utils/Traits/UserSettings.php
+++ b/app/Utils/Traits/UserSettings.php
@@ -22,7 +22,7 @@ trait UserSettings
* @param string $entity
* @return stdClass
*/
- public function getEntity(string $entity) : stdClass
+ public function getEntity(string $entity): stdClass
{
return $this->settings()->{$entity};
}
@@ -31,7 +31,7 @@ trait UserSettings
* @param string $entity
* @return stdClass
*/
- public function getColumnVisibility(string $entity) : stdClass
+ public function getColumnVisibility(string $entity): stdClass
{
return $this->settings()->{class_basename($entity)}->datatable->column_visibility;
}
diff --git a/app/Utils/TranslationHelper.php b/app/Utils/TranslationHelper.php
index 20ffbd984ecb..15b1307c3158 100644
--- a/app/Utils/TranslationHelper.php
+++ b/app/Utils/TranslationHelper.php
@@ -11,7 +11,7 @@
namespace App\Utils;
-use \Illuminate\Support\Facades\Cache;
+use Illuminate\Support\Facades\Cache;
use App\Models\PaymentTerm;
use Illuminate\Support\Str;
diff --git a/app/Utils/VendorHtmlEngine.php b/app/Utils/VendorHtmlEngine.php
index 28ebb9fb3a68..533f4893a85f 100644
--- a/app/Utils/VendorHtmlEngine.php
+++ b/app/Utils/VendorHtmlEngine.php
@@ -36,7 +36,7 @@ class VendorHtmlEngine
use MakesDates;
use AppSetup;
use DesignCalculator;
-
+
public $entity;
public $invitation;
@@ -66,9 +66,9 @@ class VendorHtmlEngine
$this->company = $invitation->company;
$this->contact = $invitation->contact->load('vendor');
-
+
$this->vendor = $this->contact->vendor->load('company', 'country');
-
+
if (!$this->vendor->currency_id) {
$this->vendor->currency_id = $this->company->settings->currency_id;
$this->vendor->save();
@@ -83,13 +83,13 @@ class VendorHtmlEngine
$this->helpers = new Helpers();
}
- public function setSettings($settings):self
+ public function setSettings($settings): self
{
$this->settings = $settings;
return $this;
}
-
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -112,7 +112,7 @@ class VendorHtmlEngine
}
}
- public function buildEntityDataArray() :array
+ public function buildEntityDataArray(): array
{
if (! $this->vendor->currency()) {
throw new Exception(debug_backtrace()[1]['function'], 1);
@@ -139,7 +139,7 @@ class VendorHtmlEngine
$data['$due_date'] = ['value' => $this->translateDate($this->entity->due_date, $this->company->date_format(), $this->vendor->locale()) ?: ' ', 'label' => ctrans('texts.due_date')];
$data['$partial_due_date'] = ['value' => $this->translateDate($this->entity->partial_due_date, $this->company->date_format(), $this->vendor->locale()) ?: ' ', 'label' => ctrans('texts.'.$this->entity_string.'_due_date')];
-
+
$data['$dueDate'] = &$data['$due_date'];
$data['$purchase_order.due_date'] = &$data['$due_date'];
@@ -168,7 +168,7 @@ class VendorHtmlEngine
$data['$purchase_order.due_date'] = &$data['$due_date'];
$data['$entity_issued_to'] = ['value' => '', 'label' => ctrans("texts.purchase_order_issued_to")];
- $data['$portal_url'] = ['value' => $this->invitation->getPortalLink(), 'label' =>''];
+ $data['$portal_url'] = ['value' => $this->invitation->getPortalLink(), 'label' => ''];
$data['$entity_number'] = &$data['$number'];
$data['$discount'] = ['value' => $this->entity->discount, 'label' => ctrans('texts.discount')];
@@ -183,19 +183,19 @@ class VendorHtmlEngine
if ($this->entity->partial > 0) {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->partial, $this->vendor) ?: ' ', 'label' => ctrans('texts.partial_due')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->partial), 'label' => ctrans('texts.partial_due')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->partial), 'label' => ctrans('texts.partial_due')];
$data['$balance_due_raw'] = ['value' => $this->entity->partial, 'label' => ctrans('texts.partial_due')];
$data['$amount_raw'] = ['value' => $this->entity->partial, 'label' => ctrans('texts.partial_due')];
$data['$due_date'] = ['value' => $this->translateDate($this->entity->partial_due_date, $this->company->date_format(), $this->vendor->locale()) ?: ' ', 'label' => ctrans('texts.'.$this->entity_string.'_due_date')];
} else {
if ($this->entity->status_id == 1) {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->amount, $this->vendor) ?: ' ', 'label' => ctrans('texts.balance_due')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->amount), 'label' => ctrans('texts.balance_due')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->amount), 'label' => ctrans('texts.balance_due')];
$data['$balance_due_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.balance_due')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
} else {
$data['$balance_due'] = ['value' => Number::formatMoney($this->entity->balance, $this->vendor) ?: ' ', 'label' => ctrans('texts.balance_due')];
- $data['$balance_due_dec'] = ['value' => sprintf("%01.2f",$this->entity->balance), 'label' => ctrans('texts.balance_due')];
+ $data['$balance_due_dec'] = ['value' => sprintf("%01.2f", $this->entity->balance), 'label' => ctrans('texts.balance_due')];
$data['$balance_due_raw'] = ['value' => $this->entity->balance, 'label' => ctrans('texts.balance_due')];
$data['$amount_raw'] = ['value' => $this->entity->amount, 'label' => ctrans('texts.amount')];
}
@@ -203,7 +203,7 @@ class VendorHtmlEngine
$data['$outstanding'] = &$data['$balance_due'];
$data['$purchase_order.balance_due'] = &$data['$balance_due'];
-
+
$data['$partial_due'] = ['value' => Number::formatMoney($this->entity->partial, $this->vendor) ?: ' ', 'label' => ctrans('texts.partial_due')];
$data['$partial'] = &$data['$partial_due'];
@@ -255,7 +255,7 @@ class VendorHtmlEngine
$data['$country'] = ['value' => isset($this->vendor->country->name) ? ctrans('texts.country_' . $this->vendor->country->name) : '', 'label' => ctrans('texts.country')];
$data['$country_2'] = ['value' => isset($this->vendor->country) ? $this->vendor->country->iso_3166_2 : '', 'label' => ctrans('texts.country')];
$data['$email'] = ['value' => isset($this->contact) ? $this->contact->email : 'no contact email on record', 'label' => ctrans('texts.email')];
-
+
if (str_contains($data['$email']['value'], 'example.com')) {
$data['$email'] = ['value' => '', 'label' => ctrans('texts.email')];
}
@@ -284,7 +284,7 @@ class VendorHtmlEngine
$data['$vendor.postal_city'] = &$data['$postal_city'];
$data['$vendor.country'] = &$data['$country'];
$data['$vendor.email'] = &$data['$email'];
-
+
$data['$vendor.billing_address'] = &$data['$vendor_address'];
$data['$vendor.billing_address1'] = &$data['$vendor.address1'];
$data['$vendor.billing_address2'] = &$data['$vendor.address2'];
@@ -406,7 +406,7 @@ class VendorHtmlEngine
$data['$entity_footer'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->footer), $this->company), 'label' => ''];
$data['$footer'] = &$data['$entity_footer'];
-
+
$data['$page_size'] = ['value' => $this->settings->page_size, 'label' => ''];
$data['$page_layout'] = ['value' => property_exists($this->settings, 'page_layout') ? $this->settings->page_layout : 'Portrait', 'label' => ''];
@@ -463,7 +463,7 @@ class VendorHtmlEngine
$data['$client.postal_city'] = &$data['$postal_city'];
$data['$client.country'] = &$data['$country'];
$data['$client.email'] = &$data['$email'];
-
+
$data['$client.billing_address'] = &$data['$client_address'];
$data['$client.billing_address1'] = &$data['$client.address1'];
$data['$client.billing_address2'] = &$data['$client.address2'];
@@ -495,7 +495,7 @@ class VendorHtmlEngine
return $data;
}
- public function makeValues() :array
+ public function makeValues(): array
{
$data = [];
@@ -522,7 +522,7 @@ class VendorHtmlEngine
return $data;
}
- private function totalTaxLabels() :string
+ private function totalTaxLabels(): string
{
$data = '';
@@ -537,7 +537,7 @@ class VendorHtmlEngine
return $data;
}
- private function totalTaxValues() :string
+ private function totalTaxValues(): string
{
$data = '';
@@ -552,7 +552,7 @@ class VendorHtmlEngine
return $data;
}
- private function lineTaxLabels() :string
+ private function lineTaxLabels(): string
{
$tax_map = $this->entity_calc->getTaxMap();
@@ -565,7 +565,7 @@ class VendorHtmlEngine
return $data;
}
- private function getCountryName() :string
+ private function getCountryName(): string
{
$countries = Cache::get('countries');
@@ -591,7 +591,7 @@ class VendorHtmlEngine
}
- private function getCountryCode() :string
+ private function getCountryCode(): string
{
$country = Country::find($this->settings->country_id);
@@ -755,7 +755,7 @@ html {
}
*/
- private function lineTaxValues() :string
+ private function lineTaxValues(): string
{
$tax_map = $this->entity_calc->getTaxMap();
@@ -795,7 +795,7 @@ html {
$container = $dom->createElement('div');
$container->setAttribute('style', 'display:grid; grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);justify-items: center;');
-
+
foreach ($this->entity->documents()->where('is_public', true)->get() as $document) {
if (!$document->isImage()) {
continue;
@@ -814,7 +814,7 @@ html {
$html = $dom->saveHTML();
$dom = null;
-
+
return $html;
}
diff --git a/composer.lock b/composer.lock
index 506c02a6fde7..45645718f95f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -60,43 +60,36 @@
},
{
"name": "amphp/amp",
- "version": "v2.6.2",
+ "version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/amphp/amp.git",
- "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb"
+ "reference": "aaf0ec1d5a2c20b523258995a10e80c1fb765871"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb",
- "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb",
+ "url": "https://api.github.com/repos/amphp/amp/zipball/aaf0ec1d5a2c20b523258995a10e80c1fb765871",
+ "reference": "aaf0ec1d5a2c20b523258995a10e80c1fb765871",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2"
},
"require-dev": {
- "amphp/php-cs-fixer-config": "dev-master",
- "amphp/phpunit-util": "^1",
- "ext-json": "*",
- "jetbrains/phpstorm-stubs": "^2019.3",
- "phpunit/phpunit": "^7 | ^8 | ^9",
- "psalm/phar": "^3.11@dev",
- "react/promise": "^2"
+ "amphp/php-cs-fixer-config": "^2",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^4.13"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- },
"autoload": {
"files": [
- "lib/functions.php",
- "lib/Internal/functions.php"
+ "src/functions.php",
+ "src/Future/functions.php",
+ "src/Internal/functions.php"
],
"psr-4": {
- "Amp\\": "lib"
+ "Amp\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -104,10 +97,6 @@
"MIT"
],
"authors": [
- {
- "name": "Daniel Lowrey",
- "email": "rdlowrey@php.net"
- },
{
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
@@ -119,6 +108,10 @@
{
"name": "Niklas Keller",
"email": "me@kelunik.com"
+ },
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@php.net"
}
],
"description": "A non-blocking concurrency framework for PHP applications.",
@@ -135,9 +128,8 @@
"promise"
],
"support": {
- "irc": "irc://irc.freenode.org/amphp",
"issues": "https://github.com/amphp/amp/issues",
- "source": "https://github.com/amphp/amp/tree/v2.6.2"
+ "source": "https://github.com/amphp/amp/tree/v3.0.0"
},
"funding": [
{
@@ -145,46 +137,45 @@
"type": "github"
}
],
- "time": "2022-02-20T17:52:18+00:00"
+ "time": "2022-12-18T16:52:44+00:00"
},
{
"name": "amphp/byte-stream",
- "version": "v1.8.1",
+ "version": "v2.1.0",
"source": {
"type": "git",
"url": "https://github.com/amphp/byte-stream.git",
- "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd"
+ "reference": "0a4b0e80dad92c75e6131f8ad253919211540338"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd",
- "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd",
+ "url": "https://api.github.com/repos/amphp/byte-stream/zipball/0a4b0e80dad92c75e6131f8ad253919211540338",
+ "reference": "0a4b0e80dad92c75e6131f8ad253919211540338",
"shasum": ""
},
"require": {
- "amphp/amp": "^2",
- "php": ">=7.1"
+ "amphp/amp": "^3",
+ "amphp/parser": "^1.1",
+ "amphp/pipeline": "^1",
+ "amphp/serialization": "^1",
+ "amphp/sync": "^2",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2.3"
},
"require-dev": {
- "amphp/php-cs-fixer-config": "dev-master",
- "amphp/phpunit-util": "^1.4",
- "friendsofphp/php-cs-fixer": "^2.3",
- "jetbrains/phpstorm-stubs": "^2019.3",
- "phpunit/phpunit": "^6 || ^7 || ^8",
- "psalm/phar": "^3.11.4"
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.4"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.x-dev"
- }
- },
"autoload": {
"files": [
- "lib/functions.php"
+ "src/functions.php",
+ "src/Internal/functions.php"
],
"psr-4": {
- "Amp\\ByteStream\\": "lib"
+ "Amp\\ByteStream\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -202,7 +193,7 @@
}
],
"description": "A stream abstraction to make working with non-blocking I/O simple.",
- "homepage": "http://amphp.org/byte-stream",
+ "homepage": "https://amphp.org/byte-stream",
"keywords": [
"amp",
"amphp",
@@ -212,9 +203,8 @@
"stream"
],
"support": {
- "irc": "irc://irc.freenode.org/amphp",
"issues": "https://github.com/amphp/byte-stream/issues",
- "source": "https://github.com/amphp/byte-stream/tree/v1.8.1"
+ "source": "https://github.com/amphp/byte-stream/tree/v2.1.0"
},
"funding": [
{
@@ -222,45 +212,203 @@
"type": "github"
}
],
- "time": "2021-03-30T17:13:30+00:00"
+ "time": "2023-11-19T14:34:16+00:00"
},
{
- "name": "amphp/parallel",
- "version": "v1.4.3",
+ "name": "amphp/cache",
+ "version": "v2.0.0",
"source": {
"type": "git",
- "url": "https://github.com/amphp/parallel.git",
- "reference": "3aac213ba7858566fd83d38ccb85b91b2d652cb0"
+ "url": "https://github.com/amphp/cache.git",
+ "reference": "218bb3888d380eb9dd926cd06f803573c84391d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/parallel/zipball/3aac213ba7858566fd83d38ccb85b91b2d652cb0",
- "reference": "3aac213ba7858566fd83d38ccb85b91b2d652cb0",
+ "url": "https://api.github.com/repos/amphp/cache/zipball/218bb3888d380eb9dd926cd06f803573c84391d3",
+ "reference": "218bb3888d380eb9dd926cd06f803573c84391d3",
"shasum": ""
},
"require": {
- "amphp/amp": "^2",
- "amphp/byte-stream": "^1.6.1",
- "amphp/parser": "^1",
- "amphp/process": "^1",
+ "amphp/amp": "^3",
"amphp/serialization": "^1",
- "amphp/sync": "^1.0.1",
- "php": ">=7.1"
+ "amphp/sync": "^2",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2"
},
"require-dev": {
- "amphp/php-cs-fixer-config": "dev-master",
- "amphp/phpunit-util": "^1.1",
- "phpunit/phpunit": "^8 || ^7"
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.4"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Amp\\Cache\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ },
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@php.net"
+ }
+ ],
+ "description": "A fiber-aware cache API based on Amp and Revolt.",
+ "homepage": "https://amphp.org/cache",
+ "support": {
+ "issues": "https://github.com/amphp/cache/issues",
+ "source": "https://github.com/amphp/cache/tree/v2.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2023-01-09T21:04:12+00:00"
+ },
+ {
+ "name": "amphp/dns",
+ "version": "v2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/dns.git",
+ "reference": "c3b518f321f26e786554480de580f06b9f34d1cd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/dns/zipball/c3b518f321f26e786554480de580f06b9f34d1cd",
+ "reference": "c3b518f321f26e786554480de580f06b9f34d1cd",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^3",
+ "amphp/byte-stream": "^2",
+ "amphp/cache": "^2",
+ "amphp/parser": "^1",
+ "amphp/windows-registry": "^1",
+ "daverandom/libdns": "^2.0.2",
+ "ext-filter": "*",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.4"
},
"type": "library",
"autoload": {
"files": [
- "lib/Context/functions.php",
- "lib/Sync/functions.php",
- "lib/Worker/functions.php"
+ "src/functions.php"
],
"psr-4": {
- "Amp\\Parallel\\": "lib"
+ "Amp\\Dns\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Chris Wright",
+ "email": "addr@daverandom.com"
+ },
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@php.net"
+ },
+ {
+ "name": "Bob Weinand",
+ "email": "bobwei9@hotmail.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ },
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ }
+ ],
+ "description": "Async DNS resolution for Amp.",
+ "homepage": "https://github.com/amphp/dns",
+ "keywords": [
+ "amp",
+ "amphp",
+ "async",
+ "client",
+ "dns",
+ "resolve"
+ ],
+ "support": {
+ "issues": "https://github.com/amphp/dns/issues",
+ "source": "https://github.com/amphp/dns/tree/v2.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2023-11-18T15:49:57+00:00"
+ },
+ {
+ "name": "amphp/parallel",
+ "version": "v2.2.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/parallel.git",
+ "reference": "5aeaad20297507cc754859236720501b54306eba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/parallel/zipball/5aeaad20297507cc754859236720501b54306eba",
+ "reference": "5aeaad20297507cc754859236720501b54306eba",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^3",
+ "amphp/byte-stream": "^2",
+ "amphp/parser": "^1",
+ "amphp/pipeline": "^1",
+ "amphp/process": "^2",
+ "amphp/serialization": "^1",
+ "amphp/socket": "^2",
+ "amphp/sync": "^2",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.18"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/Context/functions.php",
+ "src/Context/Internal/functions.php",
+ "src/Ipc/functions.php",
+ "src/Worker/functions.php"
+ ],
+ "psr-4": {
+ "Amp\\Parallel\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -272,6 +420,10 @@
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ },
{
"name": "Stephen Coakley",
"email": "me@stephencoakley.com"
@@ -288,7 +440,7 @@
],
"support": {
"issues": "https://github.com/amphp/parallel/issues",
- "source": "https://github.com/amphp/parallel/tree/v1.4.3"
+ "source": "https://github.com/amphp/parallel/tree/v2.2.6"
},
"funding": [
{
@@ -296,65 +448,7 @@
"type": "github"
}
],
- "time": "2023-03-23T08:04:23+00:00"
- },
- {
- "name": "amphp/parallel-functions",
- "version": "v1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/amphp/parallel-functions.git",
- "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/amphp/parallel-functions/zipball/04e92fcacfc921a56dfe12c23b3265e62593a7cb",
- "reference": "04e92fcacfc921a56dfe12c23b3265e62593a7cb",
- "shasum": ""
- },
- "require": {
- "amphp/amp": "^2.0.3",
- "amphp/parallel": "^1.4",
- "amphp/serialization": "^1.0",
- "laravel/serializable-closure": "^1.0",
- "php": ">=7.4"
- },
- "require-dev": {
- "amphp/php-cs-fixer-config": "v2.x-dev",
- "amphp/phpunit-util": "^2.0",
- "phpunit/phpunit": "^9.5.11"
- },
- "type": "library",
- "autoload": {
- "files": [
- "src/functions.php"
- ],
- "psr-4": {
- "Amp\\ParallelFunctions\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Niklas Keller",
- "email": "me@kelunik.com"
- }
- ],
- "description": "Parallel processing made simple.",
- "support": {
- "issues": "https://github.com/amphp/parallel-functions/issues",
- "source": "https://github.com/amphp/parallel-functions/tree/v1.1.0"
- },
- "funding": [
- {
- "url": "https://github.com/amphp",
- "type": "github"
- }
- ],
- "time": "2022-02-03T19:32:41+00:00"
+ "time": "2024-01-07T18:12:13+00:00"
},
{
"name": "amphp/parser",
@@ -419,36 +513,106 @@
"time": "2022-12-30T18:08:47+00:00"
},
{
- "name": "amphp/process",
- "version": "v1.1.4",
+ "name": "amphp/pipeline",
+ "version": "v1.1.0",
"source": {
"type": "git",
- "url": "https://github.com/amphp/process.git",
- "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f"
+ "url": "https://github.com/amphp/pipeline.git",
+ "reference": "8a0ecc281bb0932d6b4a786453aff18c55756e63"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/process/zipball/76e9495fd6818b43a20167cb11d8a67f7744ee0f",
- "reference": "76e9495fd6818b43a20167cb11d8a67f7744ee0f",
+ "url": "https://api.github.com/repos/amphp/pipeline/zipball/8a0ecc281bb0932d6b4a786453aff18c55756e63",
+ "reference": "8a0ecc281bb0932d6b4a786453aff18c55756e63",
"shasum": ""
},
"require": {
- "amphp/amp": "^2",
- "amphp/byte-stream": "^1.4",
- "php": ">=7"
+ "amphp/amp": "^3",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1"
},
"require-dev": {
- "amphp/php-cs-fixer-config": "dev-master",
- "amphp/phpunit-util": "^1",
- "phpunit/phpunit": "^6"
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.18"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Amp\\Pipeline\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "Asynchronous iterators and operators.",
+ "homepage": "https://amphp.org/pipeline",
+ "keywords": [
+ "amp",
+ "amphp",
+ "async",
+ "io",
+ "iterator",
+ "non-blocking"
+ ],
+ "support": {
+ "issues": "https://github.com/amphp/pipeline/issues",
+ "source": "https://github.com/amphp/pipeline/tree/v1.1.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-23T04:34:28+00:00"
+ },
+ {
+ "name": "amphp/process",
+ "version": "v2.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/process.git",
+ "reference": "a65d3bc1f36ef12d44df42a68f0f0643183f1052"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/process/zipball/a65d3bc1f36ef12d44df42a68f0f0643183f1052",
+ "reference": "a65d3bc1f36ef12d44df42a68f0f0643183f1052",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^3",
+ "amphp/byte-stream": "^2",
+ "amphp/sync": "^2",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.4"
},
"type": "library",
"autoload": {
"files": [
- "lib/functions.php"
+ "src/functions.php"
],
"psr-4": {
- "Amp\\Process\\": "lib"
+ "Amp\\Process\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -469,11 +633,11 @@
"email": "me@kelunik.com"
}
],
- "description": "Asynchronous process manager.",
- "homepage": "https://github.com/amphp/process",
+ "description": "A fiber-aware process manager based on Amp and Revolt.",
+ "homepage": "https://amphp.org/process",
"support": {
"issues": "https://github.com/amphp/process/issues",
- "source": "https://github.com/amphp/process/tree/v1.1.4"
+ "source": "https://github.com/amphp/process/tree/v2.0.1"
},
"funding": [
{
@@ -481,7 +645,7 @@
"type": "github"
}
],
- "time": "2022-07-06T23:50:12+00:00"
+ "time": "2023-01-15T16:00:57+00:00"
},
{
"name": "amphp/serialization",
@@ -542,33 +706,120 @@
"time": "2020-03-25T21:39:07+00:00"
},
{
- "name": "amphp/sync",
- "version": "v1.4.2",
+ "name": "amphp/socket",
+ "version": "v2.2.2",
"source": {
"type": "git",
- "url": "https://github.com/amphp/sync.git",
- "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf"
+ "url": "https://github.com/amphp/socket.git",
+ "reference": "eb6c5e6baae5aebd9a209f50e81bff38c7efef97"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/sync/zipball/85ab06764f4f36d63b1356b466df6111cf4b89cf",
- "reference": "85ab06764f4f36d63b1356b466df6111cf4b89cf",
+ "url": "https://api.github.com/repos/amphp/socket/zipball/eb6c5e6baae5aebd9a209f50e81bff38c7efef97",
+ "reference": "eb6c5e6baae5aebd9a209f50e81bff38c7efef97",
"shasum": ""
},
"require": {
- "amphp/amp": "^2.2",
- "php": ">=7.1"
+ "amphp/amp": "^3",
+ "amphp/byte-stream": "^2",
+ "amphp/dns": "^2",
+ "ext-openssl": "*",
+ "kelunik/certificate": "^1.1",
+ "league/uri": "^6.5 | ^7",
+ "league/uri-interfaces": "^2.3 | ^7",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2"
},
"require-dev": {
- "amphp/php-cs-fixer-config": "dev-master",
- "amphp/phpunit-util": "^1.1",
- "phpunit/phpunit": "^9 || ^8 || ^7"
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "amphp/process": "^2",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.4"
},
"type": "library",
"autoload": {
"files": [
"src/functions.php",
- "src/ConcurrentIterator/functions.php"
+ "src/Internal/functions.php",
+ "src/SocketAddress/functions.php"
+ ],
+ "psr-4": {
+ "Amp\\Socket\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Daniel Lowrey",
+ "email": "rdlowrey@gmail.com"
+ },
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.",
+ "homepage": "https://github.com/amphp/socket",
+ "keywords": [
+ "amp",
+ "async",
+ "encryption",
+ "non-blocking",
+ "sockets",
+ "tcp",
+ "tls"
+ ],
+ "support": {
+ "issues": "https://github.com/amphp/socket/issues",
+ "source": "https://github.com/amphp/socket/tree/v2.2.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-31T18:12:01+00:00"
+ },
+ {
+ "name": "amphp/sync",
+ "version": "v2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/sync.git",
+ "reference": "50ddc7392cc8034b3e4798cef3cc90d3f4c0441c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/sync/zipball/50ddc7392cc8034b3e4798cef3cc90d3f4c0441c",
+ "reference": "50ddc7392cc8034b3e4798cef3cc90d3f4c0441c",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/amp": "^3",
+ "amphp/pipeline": "^1",
+ "amphp/serialization": "^1",
+ "php": ">=8.1",
+ "revolt/event-loop": "^1 || ^0.2"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "^2",
+ "amphp/phpunit-util": "^3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.4"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/functions.php"
],
"psr-4": {
"Amp\\Sync\\": "src"
@@ -583,12 +834,16 @@
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ },
{
"name": "Stephen Coakley",
"email": "me@stephencoakley.com"
}
],
- "description": "Mutex, Semaphore, and other synchronization tools for Amp.",
+ "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.",
"homepage": "https://github.com/amphp/sync",
"keywords": [
"async",
@@ -599,7 +854,7 @@
],
"support": {
"issues": "https://github.com/amphp/sync/issues",
- "source": "https://github.com/amphp/sync/tree/v1.4.2"
+ "source": "https://github.com/amphp/sync/tree/v2.1.0"
},
"funding": [
{
@@ -607,7 +862,59 @@
"type": "github"
}
],
- "time": "2021-10-25T18:29:10+00:00"
+ "time": "2023-08-19T13:53:40+00:00"
+ },
+ {
+ "name": "amphp/windows-registry",
+ "version": "v1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/amphp/windows-registry.git",
+ "reference": "8248247a41af7f97b88e4716c0f8de39696ef111"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/amphp/windows-registry/zipball/8248247a41af7f97b88e4716c0f8de39696ef111",
+ "reference": "8248247a41af7f97b88e4716c0f8de39696ef111",
+ "shasum": ""
+ },
+ "require": {
+ "amphp/byte-stream": "^2",
+ "amphp/process": "^2",
+ "php": ">=8.1"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "^2",
+ "psalm/phar": "^5.4"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Amp\\WindowsRegistry\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "Windows Registry Reader.",
+ "support": {
+ "issues": "https://github.com/amphp/windows-registry/issues",
+ "source": "https://github.com/amphp/windows-registry/tree/v1.0.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/amphp",
+ "type": "github"
+ }
+ ],
+ "time": "2023-01-09T22:29:20+00:00"
},
{
"name": "apimatic/core",
@@ -1036,16 +1343,16 @@
},
{
"name": "aws/aws-sdk-php",
- "version": "3.295.4",
+ "version": "3.296.1",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
- "reference": "2372661db989fe4229abd95f4434b37252076d58"
+ "reference": "38e47bbd3b5f76f008dd71c8a68545f9e4e47b6b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2372661db989fe4229abd95f4434b37252076d58",
- "reference": "2372661db989fe4229abd95f4434b37252076d58",
+ "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/38e47bbd3b5f76f008dd71c8a68545f9e4e47b6b",
+ "reference": "38e47bbd3b5f76f008dd71c8a68545f9e4e47b6b",
"shasum": ""
},
"require": {
@@ -1125,9 +1432,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
- "source": "https://github.com/aws/aws-sdk-php/tree/3.295.4"
+ "source": "https://github.com/aws/aws-sdk-php/tree/3.296.1"
},
- "time": "2023-12-29T19:07:49+00:00"
+ "time": "2024-01-14T05:20:33+00:00"
},
{
"name": "bacon/bacon-qr-code",
@@ -1237,16 +1544,16 @@
},
{
"name": "braintree/braintree_php",
- "version": "6.15.0",
+ "version": "6.16.0",
"source": {
"type": "git",
"url": "https://github.com/braintree/braintree_php.git",
- "reference": "16efb08e19cb6c579deba11e119ef6409d28eae3"
+ "reference": "fe3d852149ae7f0c3a8f193c7875468ea4e2d5f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/braintree/braintree_php/zipball/16efb08e19cb6c579deba11e119ef6409d28eae3",
- "reference": "16efb08e19cb6c579deba11e119ef6409d28eae3",
+ "url": "https://api.github.com/repos/braintree/braintree_php/zipball/fe3d852149ae7f0c3a8f193c7875468ea4e2d5f7",
+ "reference": "fe3d852149ae7f0c3a8f193c7875468ea4e2d5f7",
"shasum": ""
},
"require": {
@@ -1280,9 +1587,9 @@
"description": "Braintree PHP Client Library",
"support": {
"issues": "https://github.com/braintree/braintree_php/issues",
- "source": "https://github.com/braintree/braintree_php/tree/6.15.0"
+ "source": "https://github.com/braintree/braintree_php/tree/6.16.0"
},
- "time": "2023-11-08T00:15:11+00:00"
+ "time": "2024-01-09T22:07:58+00:00"
},
{
"name": "brick/math",
@@ -1410,16 +1717,16 @@
},
{
"name": "checkout/checkout-sdk-php",
- "version": "3.0.19",
+ "version": "3.0.20",
"source": {
"type": "git",
"url": "https://github.com/checkout/checkout-sdk-php.git",
- "reference": "e8d03bdc2e174de5ddd2e5a48308eb93796805ea"
+ "reference": "4310ef994a663b925d1209f8c579f0965f5e14f8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/checkout/checkout-sdk-php/zipball/e8d03bdc2e174de5ddd2e5a48308eb93796805ea",
- "reference": "e8d03bdc2e174de5ddd2e5a48308eb93796805ea",
+ "url": "https://api.github.com/repos/checkout/checkout-sdk-php/zipball/4310ef994a663b925d1209f8c579f0965f5e14f8",
+ "reference": "4310ef994a663b925d1209f8c579f0965f5e14f8",
"shasum": ""
},
"require": {
@@ -1472,9 +1779,9 @@
],
"support": {
"issues": "https://github.com/checkout/checkout-sdk-php/issues",
- "source": "https://github.com/checkout/checkout-sdk-php/tree/3.0.19"
+ "source": "https://github.com/checkout/checkout-sdk-php/tree/3.0.20"
},
- "time": "2023-12-22T14:20:21+00:00"
+ "time": "2024-01-10T13:50:01+00:00"
},
{
"name": "cleverit/ubl_invoice",
@@ -1727,6 +2034,50 @@
},
"time": "2023-08-25T16:18:39+00:00"
},
+ {
+ "name": "daverandom/libdns",
+ "version": "v2.0.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/DaveRandom/LibDNS.git",
+ "reference": "42c2d700d1178c9f9e78664793463f7f1aea248c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/42c2d700d1178c9f9e78664793463f7f1aea248c",
+ "reference": "42c2d700d1178c9f9e78664793463f7f1aea248c",
+ "shasum": ""
+ },
+ "require": {
+ "ext-ctype": "*",
+ "php": ">=7.0"
+ },
+ "suggest": {
+ "ext-intl": "Required for IDN support"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/functions.php"
+ ],
+ "psr-4": {
+ "LibDNS\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "DNS protocol implementation written in pure PHP",
+ "keywords": [
+ "dns"
+ ],
+ "support": {
+ "issues": "https://github.com/DaveRandom/LibDNS/issues",
+ "source": "https://github.com/DaveRandom/LibDNS/tree/v2.0.3"
+ },
+ "time": "2022-09-20T18:15:38+00:00"
+ },
{
"name": "dflydev/dot-access-data",
"version": "v3.0.2",
@@ -2224,16 +2575,16 @@
},
{
"name": "doctrine/inflector",
- "version": "2.0.8",
+ "version": "2.0.9",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
- "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff"
+ "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
- "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff",
+ "url": "https://api.github.com/repos/doctrine/inflector/zipball/2930cd5ef353871c821d5c43ed030d39ac8cfe65",
+ "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65",
"shasum": ""
},
"require": {
@@ -2295,7 +2646,7 @@
],
"support": {
"issues": "https://github.com/doctrine/inflector/issues",
- "source": "https://github.com/doctrine/inflector/tree/2.0.8"
+ "source": "https://github.com/doctrine/inflector/tree/2.0.9"
},
"funding": [
{
@@ -2311,7 +2662,7 @@
"type": "tidelift"
}
],
- "time": "2023-06-16T13:40:37+00:00"
+ "time": "2024-01-15T18:05:13+00:00"
},
{
"name": "doctrine/instantiator",
@@ -3094,27 +3445,27 @@
},
{
"name": "google/apiclient",
- "version": "v2.15.1",
+ "version": "v2.15.3",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client.git",
- "reference": "7a95ed29e4b6c6859d2d22300c5455a92e2622ad"
+ "reference": "e70273c06d18824de77e114247ae3102f8aec64d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/7a95ed29e4b6c6859d2d22300c5455a92e2622ad",
- "reference": "7a95ed29e4b6c6859d2d22300c5455a92e2622ad",
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/e70273c06d18824de77e114247ae3102f8aec64d",
+ "reference": "e70273c06d18824de77e114247ae3102f8aec64d",
"shasum": ""
},
"require": {
"firebase/php-jwt": "~6.0",
"google/apiclient-services": "~0.200",
- "google/auth": "^1.28",
- "guzzlehttp/guzzle": "~6.5||~7.0",
+ "google/auth": "^1.33",
+ "guzzlehttp/guzzle": "^6.5.8||^7.4.5",
"guzzlehttp/psr7": "^1.8.4||^2.2.1",
"monolog/monolog": "^2.9||^3.0",
"php": "^7.4|^8.0",
- "phpseclib/phpseclib": "^3.0.19"
+ "phpseclib/phpseclib": "^3.0.34"
},
"require-dev": {
"cache/filesystem-adapter": "^1.1",
@@ -3122,7 +3473,7 @@
"phpcompatibility/php-compatibility": "^9.2",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5",
- "squizlabs/php_codesniffer": "^3.0",
+ "squizlabs/php_codesniffer": "^3.8",
"symfony/css-selector": "~2.1",
"symfony/dom-crawler": "~2.1"
},
@@ -3157,22 +3508,22 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client/issues",
- "source": "https://github.com/googleapis/google-api-php-client/tree/v2.15.1"
+ "source": "https://github.com/googleapis/google-api-php-client/tree/v2.15.3"
},
- "time": "2023-09-13T21:46:39+00:00"
+ "time": "2024-01-04T19:15:22+00:00"
},
{
"name": "google/apiclient-services",
- "version": "v0.330.0",
+ "version": "v0.332.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
- "reference": "3216fd1b6ba33c5f6658c3581e9723ff21d9acb7"
+ "reference": "027cc7fe60877c2b6ba0f380d419acf65a3755d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/3216fd1b6ba33c5f6658c3581e9723ff21d9acb7",
- "reference": "3216fd1b6ba33c5f6658c3581e9723ff21d9acb7",
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/027cc7fe60877c2b6ba0f380d419acf65a3755d2",
+ "reference": "027cc7fe60877c2b6ba0f380d419acf65a3755d2",
"shasum": ""
},
"require": {
@@ -3201,22 +3552,22 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
- "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.330.0"
+ "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.332.0"
},
- "time": "2023-12-24T01:02:15+00:00"
+ "time": "2024-01-15T00:56:15+00:00"
},
{
"name": "google/auth",
- "version": "v1.33.0",
+ "version": "v1.34.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-auth-library-php.git",
- "reference": "682dc6c30bb509953c9e43bb0960d901582da00b"
+ "reference": "155daeadfd2f09743f611ea493b828d382519575"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/682dc6c30bb509953c9e43bb0960d901582da00b",
- "reference": "682dc6c30bb509953c9e43bb0960d901582da00b",
+ "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/155daeadfd2f09743f611ea493b828d382519575",
+ "reference": "155daeadfd2f09743f611ea493b828d382519575",
"shasum": ""
},
"require": {
@@ -3259,9 +3610,9 @@
"support": {
"docs": "https://googleapis.github.io/google-auth-library-php/main/",
"issues": "https://github.com/googleapis/google-auth-library-php/issues",
- "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.33.0"
+ "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.34.0"
},
- "time": "2023-11-30T15:49:27+00:00"
+ "time": "2024-01-03T20:45:15+00:00"
},
{
"name": "graham-campbell/result-type",
@@ -4811,6 +5162,64 @@
},
"time": "2023-11-19T08:50:33+00:00"
},
+ {
+ "name": "kelunik/certificate",
+ "version": "v1.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kelunik/certificate.git",
+ "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e",
+ "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-openssl": "*",
+ "php": ">=7.0"
+ },
+ "require-dev": {
+ "amphp/php-cs-fixer-config": "^2",
+ "phpunit/phpunit": "^6 | 7 | ^8 | ^9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Kelunik\\Certificate\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "Access certificate details and transform between different formats.",
+ "keywords": [
+ "DER",
+ "certificate",
+ "certificates",
+ "openssl",
+ "pem",
+ "x509"
+ ],
+ "support": {
+ "issues": "https://github.com/kelunik/certificate/issues",
+ "source": "https://github.com/kelunik/certificate/tree/v1.1.3"
+ },
+ "time": "2023-02-03T21:26:53+00:00"
+ },
{
"name": "kmukku/php-iso11649",
"version": "1.6",
@@ -4912,16 +5321,16 @@
},
{
"name": "laravel/framework",
- "version": "v10.39.0",
+ "version": "v10.40.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c"
+ "reference": "7a9470071dac9579ebf29ad1b9d73e4b8eb586fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/114926b07bfb5fbf2545c03aa2ce5c8c37be650c",
- "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/7a9470071dac9579ebf29ad1b9d73e4b8eb586fc",
+ "reference": "7a9470071dac9579ebf29ad1b9d73e4b8eb586fc",
"shasum": ""
},
"require": {
@@ -5113,20 +5522,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2023-12-27T14:26:28+00:00"
+ "time": "2024-01-09T11:46:47+00:00"
},
{
"name": "laravel/prompts",
- "version": "v0.1.14",
+ "version": "v0.1.15",
"source": {
"type": "git",
"url": "https://github.com/laravel/prompts.git",
- "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6"
+ "reference": "d814a27514d99b03c85aa42b22cfd946568636c1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/prompts/zipball/2219fa9c4b944add1e825c3bdb8ecae8bc503bc6",
- "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6",
+ "url": "https://api.github.com/repos/laravel/prompts/zipball/d814a27514d99b03c85aa42b22cfd946568636c1",
+ "reference": "d814a27514d99b03c85aa42b22cfd946568636c1",
"shasum": ""
},
"require": {
@@ -5168,9 +5577,9 @@
],
"support": {
"issues": "https://github.com/laravel/prompts/issues",
- "source": "https://github.com/laravel/prompts/tree/v0.1.14"
+ "source": "https://github.com/laravel/prompts/tree/v0.1.15"
},
- "time": "2023-12-27T04:18:09+00:00"
+ "time": "2023-12-29T22:37:42+00:00"
},
{
"name": "laravel/serializable-closure",
@@ -5365,25 +5774,25 @@
},
{
"name": "laravel/tinker",
- "version": "v2.8.2",
+ "version": "v2.9.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/tinker.git",
- "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3"
+ "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/tinker/zipball/b936d415b252b499e8c3b1f795cd4fc20f57e1f3",
- "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3",
+ "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe",
+ "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe",
"shasum": ""
},
"require": {
- "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0",
- "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0",
- "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0",
+ "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
+ "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
+ "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"php": "^7.2.5|^8.0",
- "psy/psysh": "^0.10.4|^0.11.1",
- "symfony/var-dumper": "^4.3.4|^5.0|^6.0"
+ "psy/psysh": "^0.11.1|^0.12.0",
+ "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0"
},
"require-dev": {
"mockery/mockery": "~1.3.3|^1.4.2",
@@ -5391,13 +5800,10 @@
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"suggest": {
- "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)."
+ "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)."
},
"type": "library",
"extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- },
"laravel": {
"providers": [
"Laravel\\Tinker\\TinkerServiceProvider"
@@ -5428,9 +5834,9 @@
],
"support": {
"issues": "https://github.com/laravel/tinker/issues",
- "source": "https://github.com/laravel/tinker/tree/v2.8.2"
+ "source": "https://github.com/laravel/tinker/tree/v2.9.0"
},
- "time": "2023-08-15T14:27:00+00:00"
+ "time": "2024-01-04T16:10:04+00:00"
},
{
"name": "laravel/ui",
@@ -6390,6 +6796,180 @@
],
"time": "2021-06-05T11:34:12+00:00"
},
+ {
+ "name": "league/uri",
+ "version": "7.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/uri.git",
+ "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/uri/zipball/bf414ba956d902f5d98bf9385fcf63954f09dce5",
+ "reference": "bf414ba956d902f5d98bf9385fcf63954f09dce5",
+ "shasum": ""
+ },
+ "require": {
+ "league/uri-interfaces": "^7.3",
+ "php": "^8.1"
+ },
+ "conflict": {
+ "league/uri-schemes": "^1.0"
+ },
+ "suggest": {
+ "ext-bcmath": "to improve IPV4 host parsing",
+ "ext-fileinfo": "to create Data URI from file contennts",
+ "ext-gmp": "to improve IPV4 host parsing",
+ "ext-intl": "to handle IDN host with the best performance",
+ "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain",
+ "league/uri-components": "Needed to easily manipulate URI objects components",
+ "php-64bit": "to improve IPV4 host parsing",
+ "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "7.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "League\\Uri\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ignace Nyamagana Butera",
+ "email": "nyamsprod@gmail.com",
+ "homepage": "https://nyamsprod.com"
+ }
+ ],
+ "description": "URI manipulation library",
+ "homepage": "https://uri.thephpleague.com",
+ "keywords": [
+ "data-uri",
+ "file-uri",
+ "ftp",
+ "hostname",
+ "http",
+ "https",
+ "middleware",
+ "parse_str",
+ "parse_url",
+ "psr-7",
+ "query-string",
+ "querystring",
+ "rfc3986",
+ "rfc3987",
+ "rfc6570",
+ "uri",
+ "uri-template",
+ "url",
+ "ws"
+ ],
+ "support": {
+ "docs": "https://uri.thephpleague.com",
+ "forum": "https://thephpleague.slack.com",
+ "issues": "https://github.com/thephpleague/uri-src/issues",
+ "source": "https://github.com/thephpleague/uri/tree/7.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/nyamsprod",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-01T06:24:25+00:00"
+ },
+ {
+ "name": "league/uri-interfaces",
+ "version": "7.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/uri-interfaces.git",
+ "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/bd8c487ec236930f7bbc42b8d374fa882fbba0f3",
+ "reference": "bd8c487ec236930f7bbc42b8d374fa882fbba0f3",
+ "shasum": ""
+ },
+ "require": {
+ "ext-filter": "*",
+ "php": "^8.1",
+ "psr/http-factory": "^1",
+ "psr/http-message": "^1.1 || ^2.0"
+ },
+ "suggest": {
+ "ext-bcmath": "to improve IPV4 host parsing",
+ "ext-gmp": "to improve IPV4 host parsing",
+ "ext-intl": "to handle IDN host with the best performance",
+ "php-64bit": "to improve IPV4 host parsing",
+ "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "7.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "League\\Uri\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ignace Nyamagana Butera",
+ "email": "nyamsprod@gmail.com",
+ "homepage": "https://nyamsprod.com"
+ }
+ ],
+ "description": "Common interfaces and classes for URI representation and interaction",
+ "homepage": "https://uri.thephpleague.com",
+ "keywords": [
+ "data-uri",
+ "file-uri",
+ "ftp",
+ "hostname",
+ "http",
+ "https",
+ "parse_str",
+ "parse_url",
+ "psr-7",
+ "query-string",
+ "querystring",
+ "rfc3986",
+ "rfc3987",
+ "rfc6570",
+ "uri",
+ "url",
+ "ws"
+ ],
+ "support": {
+ "docs": "https://uri.thephpleague.com",
+ "forum": "https://thephpleague.slack.com",
+ "issues": "https://github.com/thephpleague/uri-src/issues",
+ "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sponsors/nyamsprod",
+ "type": "github"
+ }
+ ],
+ "time": "2023-11-24T15:40:42+00:00"
+ },
{
"name": "livewire/livewire",
"version": "v3.3.5",
@@ -6654,21 +7234,21 @@
},
{
"name": "microsoft/microsoft-graph",
- "version": "1.109.2",
+ "version": "1.110.0",
"source": {
"type": "git",
"url": "https://github.com/microsoftgraph/msgraph-sdk-php.git",
- "reference": "c4490238f65fc68e2263ff4d5dbdebe02e7f0517"
+ "reference": "da45ea4a5d5dda97549313129748bd10fdb2930c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/c4490238f65fc68e2263ff4d5dbdebe02e7f0517",
- "reference": "c4490238f65fc68e2263ff4d5dbdebe02e7f0517",
+ "url": "https://api.github.com/repos/microsoftgraph/msgraph-sdk-php/zipball/da45ea4a5d5dda97549313129748bd10fdb2930c",
+ "reference": "da45ea4a5d5dda97549313129748bd10fdb2930c",
"shasum": ""
},
"require": {
"ext-json": "*",
- "guzzlehttp/guzzle": "^6.0 || ^7.0",
+ "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
"php": "^8.0 || ^7.3",
"psr/http-message": "^1.0 || ^2.0"
},
@@ -6700,9 +7280,9 @@
"homepage": "https://developer.microsoft.com/en-us/graph",
"support": {
"issues": "https://github.com/microsoftgraph/msgraph-sdk-php/issues",
- "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.109.2"
+ "source": "https://github.com/microsoftgraph/msgraph-sdk-php/tree/1.110.0"
},
- "time": "2023-12-01T09:41:49+00:00"
+ "time": "2024-01-15T18:49:30+00:00"
},
{
"name": "mollie/mollie-api-php",
@@ -8543,16 +9123,16 @@
},
{
"name": "php-http/promise",
- "version": "1.2.1",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/php-http/promise.git",
- "reference": "44a67cb59f708f826f3bec35f22030b3edb90119"
+ "reference": "2916a606d3b390f4e9e8e2b8dd68581508be0f07"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-http/promise/zipball/44a67cb59f708f826f3bec35f22030b3edb90119",
- "reference": "44a67cb59f708f826f3bec35f22030b3edb90119",
+ "url": "https://api.github.com/repos/php-http/promise/zipball/2916a606d3b390f4e9e8e2b8dd68581508be0f07",
+ "reference": "2916a606d3b390f4e9e8e2b8dd68581508be0f07",
"shasum": ""
},
"require": {
@@ -8589,9 +9169,9 @@
],
"support": {
"issues": "https://github.com/php-http/promise/issues",
- "source": "https://github.com/php-http/promise/tree/1.2.1"
+ "source": "https://github.com/php-http/promise/tree/1.3.0"
},
- "time": "2023-11-08T12:57:08+00:00"
+ "time": "2024-01-04T18:49:48+00:00"
},
{
"name": "php-jsonpointer/php-jsonpointer",
@@ -8704,16 +9284,16 @@
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.7.3",
+ "version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419"
+ "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
- "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fad452781b3d774e3337b0c0b245dd8e5a4455fc",
+ "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc",
"shasum": ""
},
"require": {
@@ -8756,9 +9336,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.0"
},
- "time": "2023-08-12T11:01:26+00:00"
+ "time": "2024-01-11T11:49:22+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
@@ -9052,16 +9632,16 @@
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.24.5",
+ "version": "1.25.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc"
+ "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fedf211ff14ec8381c9bf5714e33a7a552dd1acc",
- "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240",
+ "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240",
"shasum": ""
},
"require": {
@@ -9093,9 +9673,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.5"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0"
},
- "time": "2023-12-16T09:33:33+00:00"
+ "time": "2024-01-04T17:06:16+00:00"
},
{
"name": "pragmarx/google2fa",
@@ -9673,25 +10253,25 @@
},
{
"name": "psy/psysh",
- "version": "v0.11.22",
+ "version": "v0.12.0",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
- "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b"
+ "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/bobthecow/psysh/zipball/128fa1b608be651999ed9789c95e6e2a31b5802b",
- "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b",
+ "url": "https://api.github.com/repos/bobthecow/psysh/zipball/750bf031a48fd07c673dbe3f11f72362ea306d0d",
+ "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-tokenizer": "*",
- "nikic/php-parser": "^4.0 || ^3.1",
- "php": "^8.0 || ^7.0.8",
- "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4",
- "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4"
+ "nikic/php-parser": "^5.0 || ^4.0",
+ "php": "^8.0 || ^7.4",
+ "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4",
+ "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4"
},
"conflict": {
"symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4"
@@ -9702,8 +10282,7 @@
"suggest": {
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
"ext-pdo-sqlite": "The doc command requires SQLite to work.",
- "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
- "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history."
+ "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well."
},
"bin": [
"bin/psysh"
@@ -9711,7 +10290,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-0.11": "0.11.x-dev"
+ "dev-main": "0.12.x-dev"
},
"bamarni-bin": {
"bin-links": false,
@@ -9747,9 +10326,9 @@
],
"support": {
"issues": "https://github.com/bobthecow/psysh/issues",
- "source": "https://github.com/bobthecow/psysh/tree/v0.11.22"
+ "source": "https://github.com/bobthecow/psysh/tree/v0.12.0"
},
- "time": "2023-10-14T21:56:36+00:00"
+ "time": "2023-12-20T15:28:09+00:00"
},
{
"name": "pusher/pusher-php-server",
@@ -10103,17 +10682,89 @@
"time": "2023-12-18T04:19:46+00:00"
},
{
- "name": "rmccue/requests",
- "version": "v2.0.9",
+ "name": "revolt/event-loop",
+ "version": "v1.0.6",
"source": {
"type": "git",
- "url": "https://github.com/WordPress/Requests.git",
- "reference": "422612952ff3bd5163039f8889eaaaab95a432eb"
+ "url": "https://github.com/revoltphp/event-loop.git",
+ "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/WordPress/Requests/zipball/422612952ff3bd5163039f8889eaaaab95a432eb",
- "reference": "422612952ff3bd5163039f8889eaaaab95a432eb",
+ "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254",
+ "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.1"
+ },
+ "require-dev": {
+ "ext-json": "*",
+ "jetbrains/phpstorm-stubs": "^2019.3",
+ "phpunit/phpunit": "^9",
+ "psalm/phar": "^5.15"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Revolt\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Aaron Piotrowski",
+ "email": "aaron@trowski.com"
+ },
+ {
+ "name": "Cees-Jan Kiewiet",
+ "email": "ceesjank@gmail.com"
+ },
+ {
+ "name": "Christian Lück",
+ "email": "christian@clue.engineering"
+ },
+ {
+ "name": "Niklas Keller",
+ "email": "me@kelunik.com"
+ }
+ ],
+ "description": "Rock-solid event loop for concurrent PHP applications.",
+ "keywords": [
+ "async",
+ "asynchronous",
+ "concurrency",
+ "event",
+ "event-loop",
+ "non-blocking",
+ "scheduler"
+ ],
+ "support": {
+ "issues": "https://github.com/revoltphp/event-loop/issues",
+ "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6"
+ },
+ "time": "2023-11-30T05:34:44+00:00"
+ },
+ {
+ "name": "rmccue/requests",
+ "version": "v2.0.10",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/WordPress/Requests.git",
+ "reference": "bcf1ac7fe8c0b2b18c1df6d24694cfc96b44b391"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/WordPress/Requests/zipball/bcf1ac7fe8c0b2b18c1df6d24694cfc96b44b391",
+ "reference": "bcf1ac7fe8c0b2b18c1df6d24694cfc96b44b391",
"shasum": ""
},
"require": {
@@ -10187,7 +10838,7 @@
"issues": "https://github.com/WordPress/Requests/issues",
"source": "https://github.com/WordPress/Requests"
},
- "time": "2023-11-08T19:22:04+00:00"
+ "time": "2024-01-08T11:14:32+00:00"
},
{
"name": "sabre/uri",
@@ -10749,16 +11400,16 @@
},
{
"name": "smalot/pdfparser",
- "version": "v2.7.0",
+ "version": "v2.8.0",
"source": {
"type": "git",
"url": "https://github.com/smalot/pdfparser.git",
- "reference": "eef0263bbaec86d30801d3551ac83f4e1015d4c3"
+ "reference": "268a620b96523eb4244c42931885024c8db8dae1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/smalot/pdfparser/zipball/eef0263bbaec86d30801d3551ac83f4e1015d4c3",
- "reference": "eef0263bbaec86d30801d3551ac83f4e1015d4c3",
+ "url": "https://api.github.com/repos/smalot/pdfparser/zipball/268a620b96523eb4244c42931885024c8db8dae1",
+ "reference": "268a620b96523eb4244c42931885024c8db8dae1",
"shasum": ""
},
"require": {
@@ -10794,9 +11445,9 @@
],
"support": {
"issues": "https://github.com/smalot/pdfparser/issues",
- "source": "https://github.com/smalot/pdfparser/tree/v2.7.0"
+ "source": "https://github.com/smalot/pdfparser/tree/v2.8.0"
},
- "time": "2023-08-10T06:11:26+00:00"
+ "time": "2023-12-01T11:13:56+00:00"
},
{
"name": "socialiteproviders/apple",
@@ -11081,20 +11732,20 @@
},
{
"name": "spatie/laravel-package-tools",
- "version": "1.16.1",
+ "version": "1.16.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-package-tools.git",
- "reference": "cc7c991555a37f9fa6b814aa03af73f88026a83d"
+ "reference": "e62eeb1fe8a8a0b2e83227a6c279c8c59f7d3a15"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/cc7c991555a37f9fa6b814aa03af73f88026a83d",
- "reference": "cc7c991555a37f9fa6b814aa03af73f88026a83d",
+ "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/e62eeb1fe8a8a0b2e83227a6c279c8c59f7d3a15",
+ "reference": "e62eeb1fe8a8a0b2e83227a6c279c8c59f7d3a15",
"shasum": ""
},
"require": {
- "illuminate/contracts": "^9.28|^10.0",
+ "illuminate/contracts": "^9.28|^10.0|^11.0",
"php": "^8.0"
},
"require-dev": {
@@ -11129,7 +11780,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-package-tools/issues",
- "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.1"
+ "source": "https://github.com/spatie/laravel-package-tools/tree/1.16.2"
},
"funding": [
{
@@ -11137,26 +11788,25 @@
"type": "github"
}
],
- "time": "2023-08-23T09:04:39+00:00"
+ "time": "2024-01-11T08:43:00+00:00"
},
{
"name": "spatie/php-structure-discoverer",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/php-structure-discoverer.git",
- "reference": "3e532f0952d37bb10cddd544800eb659499cda3d"
+ "reference": "d2e4e6cba962ce2a058ea415a123dd84b37765ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/php-structure-discoverer/zipball/3e532f0952d37bb10cddd544800eb659499cda3d",
- "reference": "3e532f0952d37bb10cddd544800eb659499cda3d",
+ "url": "https://api.github.com/repos/spatie/php-structure-discoverer/zipball/d2e4e6cba962ce2a058ea415a123dd84b37765ac",
+ "reference": "d2e4e6cba962ce2a058ea415a123dd84b37765ac",
"shasum": ""
},
"require": {
- "amphp/amp": "^2.6.2",
- "amphp/parallel": "^1.4.1",
- "amphp/parallel-functions": "^1.1",
+ "amphp/amp": "^v3.0",
+ "amphp/parallel": "^2.2",
"illuminate/collections": "^9.30|^10.0",
"php": "^8.1",
"spatie/laravel-package-tools": "^1.4.3",
@@ -11210,7 +11860,7 @@
],
"support": {
"issues": "https://github.com/spatie/php-structure-discoverer/issues",
- "source": "https://github.com/spatie/php-structure-discoverer/tree/2.0.0"
+ "source": "https://github.com/spatie/php-structure-discoverer/tree/2.0.1"
},
"funding": [
{
@@ -11218,7 +11868,7 @@
"type": "github"
}
],
- "time": "2023-12-21T12:04:07+00:00"
+ "time": "2024-01-08T21:01:26+00:00"
},
{
"name": "sprain/swiss-qr-bill",
@@ -15951,21 +16601,22 @@
},
{
"name": "friendsofphp/php-cs-fixer",
- "version": "v3.45.0",
+ "version": "v3.47.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
- "reference": "c0daa33cb2533cd73f48dde1c70c2afa3e7953b5"
+ "reference": "184dd992fe49169a18300dba4435212db55220f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c0daa33cb2533cd73f48dde1c70c2afa3e7953b5",
- "reference": "c0daa33cb2533cd73f48dde1c70c2afa3e7953b5",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/184dd992fe49169a18300dba4435212db55220f7",
+ "reference": "184dd992fe49169a18300dba4435212db55220f7",
"shasum": ""
},
"require": {
"composer/semver": "^3.4",
"composer/xdebug-handler": "^3.0.3",
+ "ext-filter": "*",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^7.4 || ^8.0",
@@ -16029,7 +16680,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
- "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.45.0"
+ "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.47.0"
},
"funding": [
{
@@ -16037,7 +16688,7 @@
"type": "github"
}
],
- "time": "2023-12-30T02:07:07+00:00"
+ "time": "2024-01-15T15:35:57+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -16151,16 +16802,16 @@
},
{
"name": "larastan/larastan",
- "version": "v2.8.0",
+ "version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
- "reference": "d60c1a6d49fcbb54b78922a955a55820abdbe3c7"
+ "reference": "b7cc6a29c457a7d4f3de90466392ae9ad3e17022"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/larastan/larastan/zipball/d60c1a6d49fcbb54b78922a955a55820abdbe3c7",
- "reference": "d60c1a6d49fcbb54b78922a955a55820abdbe3c7",
+ "url": "https://api.github.com/repos/larastan/larastan/zipball/b7cc6a29c457a7d4f3de90466392ae9ad3e17022",
+ "reference": "b7cc6a29c457a7d4f3de90466392ae9ad3e17022",
"shasum": ""
},
"require": {
@@ -16228,7 +16879,7 @@
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
- "source": "https://github.com/larastan/larastan/tree/v2.8.0"
+ "source": "https://github.com/larastan/larastan/tree/v2.8.1"
},
"funding": [
{
@@ -16248,7 +16899,7 @@
"type": "patreon"
}
],
- "time": "2024-01-02T22:09:07+00:00"
+ "time": "2024-01-08T09:11:17+00:00"
},
{
"name": "maximebf/debugbar",
@@ -16754,16 +17405,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.10.50",
+ "version": "1.10.56",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4"
+ "reference": "27816a01aea996191ee14d010f325434c0ee76fa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/06a98513ac72c03e8366b5a0cb00750b487032e4",
- "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/27816a01aea996191ee14d010f325434c0ee76fa",
+ "reference": "27816a01aea996191ee14d010f325434c0ee76fa",
"shasum": ""
},
"require": {
@@ -16812,7 +17463,7 @@
"type": "tidelift"
}
],
- "time": "2023-12-13T10:59:42+00:00"
+ "time": "2024-01-15T10:43:00+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -17137,16 +17788,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "10.5.5",
+ "version": "10.5.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856"
+ "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed21115d505b4b4f7dc7b5651464e19a2c7f7856",
- "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e5c5b397a95cb0db013270a985726fcae93e61b8",
+ "reference": "e5c5b397a95cb0db013270a985726fcae93e61b8",
"shasum": ""
},
"require": {
@@ -17218,7 +17869,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.5"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.7"
},
"funding": [
{
@@ -17234,7 +17885,7 @@
"type": "tidelift"
}
],
- "time": "2023-12-27T15:13:52+00:00"
+ "time": "2024-01-14T16:40:30+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -18285,16 +18936,16 @@
},
{
"name": "spatie/ignition",
- "version": "1.11.3",
+ "version": "1.12.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/ignition.git",
- "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044"
+ "reference": "5b6f801c605a593106b623e45ca41496a6e7d56d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/ignition/zipball/3d886de644ff7a5b42e4d27c1e1f67c8b5f00044",
- "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044",
+ "url": "https://api.github.com/repos/spatie/ignition/zipball/5b6f801c605a593106b623e45ca41496a6e7d56d",
+ "reference": "5b6f801c605a593106b623e45ca41496a6e7d56d",
"shasum": ""
},
"require": {
@@ -18364,39 +19015,39 @@
"type": "github"
}
],
- "time": "2023-10-18T14:09:40+00:00"
+ "time": "2024-01-03T15:49:39+00:00"
},
{
"name": "spatie/laravel-ignition",
- "version": "2.3.3",
+ "version": "2.4.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ignition.git",
- "reference": "66499cd3c858642ded56dafb8fa0352057ca20dd"
+ "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/66499cd3c858642ded56dafb8fa0352057ca20dd",
- "reference": "66499cd3c858642ded56dafb8fa0352057ca20dd",
+ "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/005e1e7b1232f3b22d7e7be3f602693efc7dba67",
+ "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
- "illuminate/support": "^10.0",
+ "illuminate/support": "^10.0|^11.0",
"php": "^8.1",
"spatie/flare-client-php": "^1.3.5",
"spatie/ignition": "^1.9",
- "symfony/console": "^6.2.3",
- "symfony/var-dumper": "^6.2.3"
+ "symfony/console": "^6.2.3|^7.0",
+ "symfony/var-dumper": "^6.2.3|^7.0"
},
"require-dev": {
- "livewire/livewire": "^2.11",
+ "livewire/livewire": "^2.11|^3.3.5",
"mockery/mockery": "^1.5.1",
- "openai-php/client": "^0.3.4",
- "orchestra/testbench": "^8.0",
- "pestphp/pest": "^1.22.3",
+ "openai-php/client": "^0.8.1",
+ "orchestra/testbench": "^8.0|^9.0",
+ "pestphp/pest": "^2.30",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan-deprecation-rules": "^1.1.1",
"phpstan/phpstan-phpunit": "^1.3.3",
@@ -18456,7 +19107,7 @@
"type": "github"
}
],
- "time": "2023-12-21T09:43:05+00:00"
+ "time": "2024-01-12T13:14:58+00:00"
},
{
"name": "spaze/phpstan-stripe",
diff --git a/lang/en/t.php b/lang/en/t.php
deleted file mode 100644
index e6474222c55e..000000000000
--- a/lang/en/t.php
+++ /dev/null
@@ -1,7 +0,0 @@
- 'Client Settings',
-);
-
-return $lang;
diff --git a/lang/en/texts.php b/lang/en/texts.php
index d46a3711de69..b7df2cdddbbd 100644
--- a/lang/en/texts.php
+++ b/lang/en/texts.php
@@ -272,13 +272,6 @@ $lang = array(
'erase_data' => 'Your account is not registered, this will permanently erase your data.',
'password' => 'Password',
'pro_plan_product' => 'Pro Plan',
- 'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!
- Next StepsA payable invoice has been sent to the email
- address associated with your account. To unlock all of the awesome
- Pro features, please follow the instructions on the invoice to pay
- for a year of Pro-level invoicing.
- Can\'t find the invoice? Need further assistance? We\'re happy to help
- -- email us at contact@invoiceninja.com',
'unsaved_changes' => 'You have unsaved changes',
'custom_fields' => 'Custom Fields',
'company_fields' => 'Company Fields',
@@ -395,7 +388,6 @@ $lang = array(
'bought_designs' => 'Successfully added additional invoice designs',
'sent' => 'Sent',
'vat_number' => 'VAT Number',
- 'timesheets' => 'Timesheets',
'payment_title' => 'Enter Your Billing Address and Credit Card information',
'payment_cvv' => '*This is the 3-4 digit number on the back of your card',
'payment_footer1' => '*Billing address must match address associated with credit card.',
@@ -437,7 +429,6 @@ $lang = array(
'reset_all' => 'Reset All',
'approve' => 'Approve',
'token_billing_type_id' => 'Token Billing',
- 'token_billing_help' => 'Store payment details with WePay, Stripe, Braintree or GoCardless.',
'token_billing_1' => 'Disabled',
'token_billing_2' => 'Opt-in - checkbox is shown but not selected',
'token_billing_3' => 'Opt-out - checkbox is shown and selected',
@@ -515,8 +506,8 @@ $lang = array(
'auto_wrap' => 'Auto Line Wrap',
'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.',
'view_documentation' => 'View Documentation',
- 'app_title' => 'Free Open-Source Online Invoicing',
- 'app_description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.',
+ 'app_title' => 'Free Online Invoicing',
+ 'app_description' => 'Invoice Ninja is a free, open-code solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.',
'rows' => 'rows',
'www' => 'www',
'logo' => 'Logo',
@@ -653,7 +644,6 @@ $lang = array(
'recurring_invoice' => 'Recurring Invoice',
'new_recurring_quote' => 'New Recurring Quote',
'recurring_quote' => 'Recurring Quote',
- 'recurring_too_soon' => 'It\'s too soon to create the next recurring invoice, it\'s scheduled for :date',
'created_by_invoice' => 'Created by :invoice',
'primary_user' => 'Primary User',
'help' => 'Help',
@@ -674,9 +664,6 @@ $lang = array(
'status_unpaid' => 'Unpaid',
'status_all' => 'All',
'show_line_item_tax' => 'Display line item taxes inline',
- 'iframe_url' => 'Website',
- 'iframe_url_help1' => 'Copy the following code to a page on your site.',
- 'iframe_url_help2' => 'You can test the feature by clicking \'View as recipient\' for an invoice.',
'auto_bill' => 'Auto Bill',
'military_time' => '24 Hour Time',
'last_sent' => 'Last Sent',
@@ -1019,8 +1006,6 @@ $lang = array(
'trial_call_to_action' => 'Start Free Trial',
'trial_success' => 'Successfully enabled two week free pro plan trial',
'overdue' => 'Overdue',
-
-
'white_label_text' => 'Purchase a ONE YEAR white label license for $:price to remove the Invoice Ninja branding from the invoice and client portal.',
'user_email_footer' => 'To adjust your email notification settings please visit :link',
'reset_password_footer' => 'If you did not request this password reset please email our support: :email',
@@ -1029,9 +1014,6 @@ $lang = array(
'old_browser' => 'Please use a :link',
'newer_browser' => 'newer browser',
'white_label_custom_css' => ':link for $:price to enable custom styling and help support our project.',
- 'bank_accounts_help' => 'Connect a bank account to automatically import expenses and create vendors. Supports American Express and :link.',
- 'us_banks' => '400+ US banks',
-
'pro_plan_remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan',
'pro_plan_remove_logo_link' => 'Click here',
'invitation_status_sent' => 'Sent',
@@ -1044,7 +1026,6 @@ $lang = array(
'email_error_user_unregistered' => 'Please register your account to send emails',
'email_error_user_unconfirmed' => 'Please confirm your account to send emails',
'email_error_invalid_contact_email' => 'Invalid contact email',
-
'navigation' => 'Navigation',
'list_invoices' => 'List Invoices',
'list_clients' => 'List Clients',
@@ -1056,8 +1037,6 @@ $lang = array(
'list_credits' => 'List Credits',
'tax_name' => 'Tax Name',
'report_settings' => 'Report Settings',
- 'search_hotkey' => 'shortcut is /',
-
'new_user' => 'New User',
'new_product' => 'New Product',
'new_tax_rate' => 'New Tax Rate',
@@ -1307,8 +1286,6 @@ $lang = array(
'braintree_paypal_help_link_text' => 'link PayPal to your BrainTree account',
'token_billing_braintree_paypal' => 'Save payment details',
'add_paypal_account' => 'Add PayPal Account',
-
-
'no_payment_method_specified' => 'No payment method specified',
'chart_type' => 'Chart Type',
'format' => 'Format',
@@ -1377,9 +1354,7 @@ $lang = array(
'bank_account' => 'Bank Account',
'payment_processed_through_wepay' => 'ACH payments will be processed using WePay.',
- 'wepay_payment_tos_agree' => 'I agree to the WePay :terms and :privacy_policy.',
'privacy_policy' => 'Privacy Policy',
- 'wepay_payment_tos_agree_required' => 'You must agree to the WePay Terms of Service and Privacy Policy.',
'ach_email_prompt' => 'Please enter your email address:',
'verification_pending' => 'Verification Pending',
@@ -1820,19 +1795,12 @@ $lang = array(
'bot_emailed_notify_paid' => 'I\'ll email you when it\'s paid.',
'add_product_to_invoice' => 'Add 1 :product',
'not_authorized' => 'You are not authorized',
- 'bot_get_code' => 'Thanks! I\'ve sent a you an email with your security code.',
- 'bot_welcome' => 'That\'s it, your account is verified.
',
'email_not_found' => 'I wasn\'t able to find an available account for :email',
'invalid_code' => 'The code is not correct',
- 'security_code_email_subject' => 'Security code for Invoice Ninja Bot',
- 'security_code_email_line1' => 'This is your Invoice Ninja Bot security code.',
- 'security_code_email_line2' => 'Note: it will expire in 10 minutes.',
'list_products' => 'List Products',
'include_item_taxes_inline' => 'Include line item taxes in line total',
'created_quotes' => 'Successfully created :count quotes(s)',
- 'limited_gateways' => 'Note: we support one credit card gateway per company.',
-
'warning' => 'Warning',
'self-update' => 'Update',
'update_invoiceninja_title' => 'Update Invoice Ninja',
@@ -2082,7 +2050,6 @@ $lang = array(
// New Client Portal styling
'invoice_from' => 'Invoices From:',
- 'email_alias_message' => 'We require each company to have a unique email address.
Consider using an alias. ie, email+label@example.com',
'full_name' => 'Full Name',
'month_year' => 'MONTH/YEAR',
'valid_thru' => 'Valid\nthru',
@@ -2151,7 +2118,6 @@ $lang = array(
'fees_disabled_for_gateway' => 'Fees are disabled for this gateway.',
'logout_and_delete' => 'Log Out/Delete Account',
'tax_rate_type_help' => 'Inclusive tax rates adjust the line item cost when selected.
Only exclusive tax rates can be used as a default.',
- 'invoice_footer_help' => 'Use $pageNumber and $pageCount to display the page information.',
'credit_note' => 'Credit Note',
'credit_issued_to' => 'Credit issued to',
'credit_to' => 'Credit to',
@@ -2175,11 +2141,6 @@ $lang = array(
'import_complete' => 'Your import has successfully completed.',
'confirm_account_to_import' => 'Please confirm your account to import data.',
'import_started' => 'Your import has started, we\'ll send you an email once it completes.',
- 'listening' => 'Listening...',
- 'microphone_help' => 'Say "new invoice for [client]" or "show me [client]\'s archived payments"',
- 'voice_commands' => 'Voice Commands',
- 'sample_commands' => 'Sample commands',
- 'voice_commands_feedback' => 'We\'re actively working to improve this feature, if there\'s a command you\'d like us to support please email us at :email.',
'payment_type_Venmo' => 'Venmo',
'payment_type_Money Order' => 'Money Order',
'archived_products' => 'Successfully archived :count products',
@@ -2220,7 +2181,6 @@ $lang = array(
'empty' => 'Empty',
'load_design' => 'Load Design',
'accepted_card_logos' => 'Accepted Card Logos',
- 'phantomjs_local_and_cloud' => 'Using local PhantomJS, falling back to phantomjscloud.com',
'google_analytics' => 'Google Analytics',
'analytics_key' => 'Analytics Key',
'analytics_key_help' => 'Track payments using :link',
@@ -2269,7 +2229,6 @@ $lang = array(
'product_notes' => 'Product Notes',
'app_version' => 'App Version',
'ofx_version' => 'OFX Version',
- 'error_app_key_set_to_default' => 'Error: APP_KEY is set to a default value, to update it backup your database and then run php artisan ninja:update-key
',
'charge_late_fee' => 'Charge Late Fee',
'late_fee_amount' => 'Late Fee Amount',
'late_fee_percent' => 'Late Fee Percent',
@@ -2410,7 +2369,6 @@ $lang = array(
'review_app_help' => 'We hope you\'re enjoying using the app.
If you\'d consider :link we\'d greatly appreciate it!',
'writing_a_review' => 'writing a review',
- 'use_english_version' => 'Make sure to use the English version of the files.
We use the column headers to match the fields.',
'tax1' => 'First Tax',
'tax2' => 'Second Tax',
'fee_help' => 'Gateway fees are the costs charged for access to the financial networks that handle the processing of online payments.',
@@ -2750,7 +2708,6 @@ $lang = array(
'email_address_changed_message' => 'The email address for your account has been changed from :old_email to :new_email.',
'test' => 'Test',
'beta' => 'Beta',
- 'gmp_required' => 'Exporting to ZIP requires the GMP extension',
'email_history' => 'Email History',
'loading' => 'Loading',
'no_messages_found' => 'No messages found',
@@ -3213,7 +3170,6 @@ $lang = array(
'welcome_to_the_new_version' => 'Welcome to the new version of Invoice Ninja',
'next_step_data_download' => 'At the next step, we\'ll let you download your data for the migration.',
'download_data' => 'Press button below to download the data.',
- 'migration_import' => 'Awesome! Now you are ready to import your migration. Go to your new installation to import your data',
'continue' => 'Continue',
'company1' => 'Custom Company 1',
'company2' => 'Custom Company 2',
diff --git a/phpstan.neon b/phpstan.neon
index 6f2c4251a087..37fd452255e5 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -8,9 +8,7 @@ parameters:
- app
excludePaths:
- 'vendor/*'
- - '../resources/*'
- - resources/
- - resources/*
+ - 'resources/*/*.php'
- 'app/Jobs/Ninja/*'
- 'app/Models/Presenters/*'
- 'app/Console/Commands/*'
diff --git a/routes/api.php b/routes/api.php
index 487c82e83b80..eb5e8963d846 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -422,6 +422,7 @@ Route::get('token_hash_router', [OneTimeTokenController::class, 'router'])->midd
Route::get('webcron', [WebCronController::class, 'index'])->middleware('throttle:100,1');
Route::post('api/v1/get_migration_account', [HostedMigrationController::class, 'getAccount'])->middleware('guest')->middleware('throttle:100,1');
Route::post('api/v1/confirm_forwarding', [HostedMigrationController::class, 'confirmForwarding'])->middleware('guest')->middleware('throttle:100,1');
+Route::post('api/v1/check_status', [HostedMigrationController::class, 'checkStatus'])->middleware('guest')->middleware('throttle:100,1');
Route::post('api/v1/process_webhook', [AppleController::class, 'process_webhook'])->middleware('throttle:1000,1');
Route::post('api/v1/confirm_purchase', [AppleController::class, 'confirm_purchase'])->middleware('throttle:1000,1');
diff --git a/tests/Feature/SubscriptionApiTest.php b/tests/Feature/SubscriptionApiTest.php
index 61f72e0d6451..a0fb674d794a 100644
--- a/tests/Feature/SubscriptionApiTest.php
+++ b/tests/Feature/SubscriptionApiTest.php
@@ -11,16 +11,18 @@
namespace Tests\Feature;
+use Tests\TestCase;
+use App\Models\Invoice;
use App\Models\Product;
+use App\Models\RecurringInvoice;
+use Tests\MockAccountData;
+use Illuminate\Support\Str;
use App\Models\Subscription;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
-use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Support\Facades\Session;
-use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;
-use Tests\MockAccountData;
-use Tests\TestCase;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
/**
* @test
@@ -32,6 +34,8 @@ class SubscriptionApiTest extends TestCase
use DatabaseTransactions;
use MockAccountData;
+ protected $faker;
+
protected function setUp(): void
{
parent::setUp();
@@ -47,6 +51,82 @@ class SubscriptionApiTest extends TestCase
Model::reguard();
}
+ public function testAssignInvoice()
+ {
+ $i = Invoice::factory()
+ ->create([
+ 'company_id' => $this->company->id,
+ 'user_id' => $this->user->id,
+ 'client_id' => $this->client->id,
+ ]);
+
+
+ $s = Subscription::factory()
+ ->create([
+ 'company_id' => $this->company->id,
+ 'user_id' => $this->user->id,
+
+ ]);
+
+ $data = [
+ 'ids' => [$s->hashed_id],
+ 'entity' => 'invoice',
+ 'entity_id' => $i->hashed_id,
+ 'action' => 'assign_invoice'
+ ];
+
+
+ $response = $this->withHeaders([
+ 'X-API-SECRET' => config('ninja.api_secret'),
+ 'X-API-TOKEN' => $this->token,
+ ])->postJson('/api/v1/subscriptions/bulk', $data);
+
+ $response->assertStatus(200);
+
+ $i = $i->fresh();
+
+ $this->assertEquals($s->id, $i->subscription_id);
+
+ }
+
+ public function testAssignRecurringInvoice()
+ {
+ $i = RecurringInvoice::factory()
+ ->create([
+ 'company_id' => $this->company->id,
+ 'user_id' => $this->user->id,
+ 'client_id' => $this->client->id,
+ ]);
+
+
+ $s = Subscription::factory()
+ ->create([
+ 'company_id' => $this->company->id,
+ 'user_id' => $this->user->id,
+
+ ]);
+
+ $data = [
+ 'ids' => [$s->hashed_id],
+ 'entity' => 'recurring_invoice',
+ 'entity_id' => $i->hashed_id,
+ 'action' => 'assign_invoice'
+ ];
+
+
+ $response = $this->withHeaders([
+ 'X-API-SECRET' => config('ninja.api_secret'),
+ 'X-API-TOKEN' => $this->token,
+ ])->postJson('/api/v1/subscriptions/bulk', $data);
+
+ $response->assertStatus(200);
+
+ $i = $i->fresh();
+
+ $this->assertEquals($s->id, $i->subscription_id);
+
+ }
+
public function testSubscriptionFilter()
{
$response = $this->withHeaders([
diff --git a/tests/Unit/InvoiceTest.php b/tests/Unit/InvoiceTest.php
index 1a60d8f2ec29..d1dadb176db7 100644
--- a/tests/Unit/InvoiceTest.php
+++ b/tests/Unit/InvoiceTest.php
@@ -49,7 +49,27 @@ class InvoiceTest extends TestCase
$this->invoice_calc = new InvoiceSum($this->invoice);
}
+ public function testPartialDueDateCast()
+ {
+ $i = Invoice::factory()
+ ->create([
+ 'company_id' => $this->company->id,
+ 'user_id' => $this->user->id,
+ 'client_id' => $this->user->id
+ ]);
+ $this->assertNull($i->partial_due_date);
+
+ $i = Invoice::factory()
+ ->create([
+ 'company_id' => $this->company->id,
+ 'user_id' => $this->user->id,
+ 'client_id' => $this->user->id,
+ 'partial_due_date' => '2023-10-10',
+ ]);
+
+ $this->assertEquals('2023-10-10', $i->partial_due_date->format('Y-m-d'));
+ }
public function testMarkPaidWithPartial()
{
@@ -66,7 +86,9 @@ class InvoiceTest extends TestCase
$invoice_calc = new InvoiceSum($this->invoice);
- $invoice = $invoice_calc->build()->getInvoice()->service()->markSent()->save();
+ /** @var \App\Models\Invoice $ii */
+ $ii = $invoice_calc->build()->getInvoice();
+ $invoice = $ii->service()->markSent()->save();
$this->assertEquals(5, $invoice->partial);
$this->assertNotNull($invoice->partial_due_date);