Skip to content

Commit

Permalink
Merge pull request #8670 from turbo124/v5-stable
Browse files Browse the repository at this point in the history
v5.6.22
  • Loading branch information
turbo124 committed Jul 26, 2023
2 parents f2b7b21 + 8d70dbc commit 538cfcd
Show file tree
Hide file tree
Showing 165 changed files with 1,489 additions and 1,205 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.6.21
5.6.22
23 changes: 23 additions & 0 deletions app/Console/Commands/CreateSingleAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,29 @@ private function createGateways($company, $user)
$cg->save();
}

if (config('ninja.testvars.paypal_rest') && ($this->gateway == 'all' || $this->gateway == 'paypal_rest')) {
$cg = new CompanyGateway;
$cg->company_id = $company->id;
$cg->user_id = $user->id;
$cg->gateway_key = '80af24a6a691230bbec33e930ab40665';
$cg->require_cvv = true;
$cg->require_billing_address = true;
$cg->require_shipping_address = true;
$cg->update_details = true;
$cg->config = encrypt(config('ninja.testvars.paypal_rest'));
$cg->save();

$gateway_types = $cg->driver()->gatewayTypes();

$fees_and_limits = new stdClass;
$fees_and_limits->{$gateway_types[0]} = new FeesAndLimits;

$cg->fees_and_limits = $fees_and_limits;
$cg->save();
}



if (config('ninja.testvars.checkout') && ($this->gateway == 'all' || $this->gateway == 'checkout')) {
$cg = new CompanyGateway;
$cg->company_id = $company->id;
Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/AccountCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class AccountCreated extends GenericCounter
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/AccountDeleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class AccountDeleted extends GenericCounter
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/AccountPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class AccountPlatform extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
3 changes: 1 addition & 2 deletions app/DataMapper/Analytics/AccountSignup.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class AccountSignup extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand All @@ -61,7 +60,7 @@ class AccountSignup extends GenericMixedMetric
* The counter
* set to 1.
*
* @var string
* @var int
*/
public $int_metric1 = 1;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/BankAccountsCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class BankAccountsCreated extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
3 changes: 1 addition & 2 deletions app/DataMapper/Analytics/DbQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class DbQuery extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand All @@ -57,7 +56,7 @@ class DbQuery extends GenericMixedMetric
* The counter
* set to 1.
*
* @var string
* @var int
*/
public $int_metric1 = 1;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/EmailCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class EmailCount extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
2 changes: 0 additions & 2 deletions app/DataMapper/Analytics/EmailFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class EmailFailure extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand All @@ -61,7 +60,6 @@ class EmailFailure extends GenericMixedMetric
* The counter
* set to 1.
*
* @var string
*/
public $int_metric1 = 1;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/EmailInvoiceFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class EmailInvoiceFailure extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
2 changes: 0 additions & 2 deletions app/DataMapper/Analytics/EmailSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class EmailSuccess extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand All @@ -61,7 +60,6 @@ class EmailSuccess extends GenericMixedMetric
* The counter
* set to 1.
*
* @var string
*/
public $int_metric1 = 1;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/LivePreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class LivePreview extends GenericCounter
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/LoginFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class LoginFailure extends GenericCounter
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
1 change: 0 additions & 1 deletion app/DataMapper/Analytics/LoginSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class LoginSuccess extends GenericCounter
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down
2 changes: 0 additions & 2 deletions app/DataMapper/Analytics/Mail/EmailBounce.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class EmailBounce extends GenericMixedMetric
*
* date("Y-m-d H:i:s")
*
* @var \DateTime
*/
public $datetime;

Expand Down Expand Up @@ -67,7 +66,6 @@ class EmailBounce extends GenericMixedMetric
* The counter
* set to 1.
*
* @var string
*/
public $int_metric1 = 1;

Expand Down
14 changes: 7 additions & 7 deletions app/DataMapper/BaseSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
class BaseSettings
{
//@deprecated
public function __construct($obj)
{
// foreach ($obj as $key => $value) {
// $obj->{$key} = $value;
// }
}
// //@deprecated
// public function __construct($obj)
// {
// // foreach ($obj as $key => $value) {
// // $obj->{$key} = $value;
// // }
// }

public static function setCasts($obj, $casts)
{
Expand Down
26 changes: 13 additions & 13 deletions app/DataMapper/ClientSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ class ClientSettings extends BaseSettings
'send_reminders' => 'bool',
];

/**
* Cast object values and return entire class
* prevents missing properties from not being returned
* and always ensure an up to date class is returned.
*
* @param $obj
*/
public function __construct($obj)
{
parent::__construct($obj);
}
// /**
// * Cast object values and return entire class
// * prevents missing properties from not being returned
// * and always ensure an up to date class is returned.
// *
// * @param $obj
// */
// public function __construct($obj)
// {
// // parent::__construct($obj);
// }

/**
* Default Client Settings scaffold.
Expand All @@ -78,8 +78,8 @@ public static function defaults() : stdClass
/**
* Merges settings from Company to Client.
*
* @param stdClass $company_settings
* @param stdClass $client_settings
* @param $company_settings
* @param $client_settings
* @return stdClass of merged settings
*/
public static function buildClientSettings($company_settings, $client_settings)
Expand Down
24 changes: 12 additions & 12 deletions app/DataMapper/CompanySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -767,18 +767,18 @@ class CompanySettings extends BaseSettings
'purchase_order_design_id',
];

/**
* Cast object values and return entire class
* prevents missing properties from not being returned
* and always ensure an up to date class is returned.
*
* @param $obj
* @deprecated
*/
public function __construct()
{
// parent::__construct($obj);
}
// /**
// * Cast object values and return entire class
// * prevents missing properties from not being returned
// * and always ensure an up to date class is returned.
// *
// * @param $obj
// * @deprecated
// */
// public function __construct()
// {
// // parent::__construct($obj);
// }

/**
* Provides class defaults on init.
Expand Down
11 changes: 1 addition & 10 deletions app/DataMapper/DefaultSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,4 @@ public static function userSettings() : stdClass
];
}

/**
* @return stdClass
*/
private static function userSettingsObject() : stdClass
{
return (object) [
// 'per_page' => self::$per_page,
];
}
}
}

0 comments on commit 538cfcd

Please sign in to comment.