Automated formatting changes

This commit is contained in:
Formatter Bot 2021-04-04 15:16:03 +00:00
parent 67f969a6b8
commit c97b516378
4 changed files with 10 additions and 12 deletions

View File

@ -58,7 +58,7 @@ final class CustomerValue
public static function getBasicCLV(array $margins, float $retentionRate, float $discountRate) : float public static function getBasicCLV(array $margins, float $retentionRate, float $discountRate) : float
{ {
$clv = 0.0; $clv = 0.0;
$c = 1; $c = 1;
foreach ($margins as $margin) { foreach ($margins as $margin) {
$clv += ($retentionRate ** $c) * $margin * \pow(1 / (1 + $discountRate), $c); $clv += ($retentionRate ** $c) * $margin * \pow(1 / (1 + $discountRate), $c);

View File

@ -21,7 +21,6 @@ use phpOMS\DataStorage\Database\Query\QueryType;
use phpOMS\DataStorage\Database\Query\Where; use phpOMS\DataStorage\Database\Query\Where;
use phpOMS\DataStorage\DataMapperInterface; use phpOMS\DataStorage\DataMapperInterface;
use phpOMS\Utils\ArrayUtils; use phpOMS\Utils\ArrayUtils;
use phpOMS\Utils\TestUtils;
/** /**
* Datamapper for databases. * Datamapper for databases.
@ -337,10 +336,10 @@ class DataMapperAbstract implements DataMapperInterface
'value' => $value, 'value' => $value,
'models' => $models === [] ? null : $models, 'models' => $models === [] ? null : $models,
'comparison' => $comparison, 'comparison' => $comparison,
'orderBy' => $orderBy, 'orderBy' => $orderBy,
'sortOrder' => $sortOrder, 'sortOrder' => $sortOrder,
'limit' => $limit, 'limit' => $limit,
'ignore' => $models === null, // don't load this model 'ignore' => $models === null, // don't load this model
]; ];
/** @var string */ /** @var string */
@ -364,7 +363,7 @@ class DataMapperAbstract implements DataMapperInterface
} }
self::$parentMapper = null; self::$parentMapper = null;
self::$withFields = []; self::$withFields = [];
self::$relations = RelationType::ALL; self::$relations = RelationType::ALL;
} }

View File

@ -83,7 +83,6 @@ final class Money extends FloatInt
return $this; return $this;
} }
/** /**
* Get money. * Get money.
* *

View File

@ -218,11 +218,11 @@ class Location implements \JsonSerializable, \Serializable
{ {
$data = \json_decode($serialized, true); $data = \json_decode($serialized, true);
$this->postal = $data['postal']; $this->postal = $data['postal'];
$this->city = $data['city']; $this->city = $data['city'];
$this->country = $data['country']; $this->country = $data['country'];
$this->address = $data['address']; $this->address = $data['address'];
$this->state = $data['state']; $this->state = $data['state'];
$this->geo = $data['geo']; $this->geo = $data['geo'];
} }
} }