-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HP-1751 Create configurations for billing types #530
Open
VadymHrechukha
wants to merge
25
commits into
hiqdev:master
Choose a base branch
from
VadymHrechukha:HP-1751_create_configurations_for_billing_types
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
145f4f0
HP-1751 Create configurations for billing types
VadymHrechukha 153f37d
HP-1751 Create configurations for billing types
VadymHrechukha 84f3be6
HP-1751 cleaned up ConsumptionConfigurator from duplicates and thus s…
VadymHrechukha 35e187c
HP-1751 removed part of Consumption configuration because it was impl…
VadymHrechukha c848e29
HP-1751 overwrote ConsumptionConfigurator::getConfigurations() method…
VadymHrechukha 547de81
HP-1751 Created HasDecorator trait and removed ServerResourceDecorato…
VadymHrechukha 3c477b0
HP-1751 fixed autoload BillingRegistry in ConsumptionConfigurator
VadymHrechukha e39fa0a
HP-1751 use DecoratedInterface from Billing Registry
VadymHrechukha ac6d395
HP-1751 tiny
VadymHrechukha f1aa881
HP-1751 added annotation for ResourceDecoratorFactory::createFromReso…
VadymHrechukha f43333b
HP-1751 tiny
VadymHrechukha 08f66cb
HP-1751 removed the last mention of ConsumptionConfigurator from conf…
VadymHrechukha 9535ff5
HP-1751 added tariff into ConsumptionConfigurator because it can't be…
VadymHrechukha 041a294
HP-1751 removed decorators because they are moved to Billing Registry
VadymHrechukha 36e414d
HP-1751 overwrote ResourceHelper::convertAmount()
VadymHrechukha 07c37be
HP-1751 tiny
VadymHrechukha 1ff5462
HP-1751 Implemented BillingRegistry::getAggregate() method
VadymHrechukha 5dc957e
HP-1751 removed old code
VadymHrechukha bfcdefc
HP-1751 add overuse to all types
VadymHrechukha 1658f36
HP-1751 tiny
VadymHrechukha d71bbd3
HP-1751 optimized Consumption page
VadymHrechukha c882709
HP-1751 created ConsumptionConfiguratorData for easier understanding …
VadymHrechukha ba3b462
HP-1751 tiny
VadymHrechukha 0582250
HP-1751 increasing speed of finance/consumption page
VadymHrechukha 1467874
HP-1751 increasing speed of finance/consumption page
VadymHrechukha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
<?php | ||
<?php declare(strict_types=1); | ||
|
||
namespace hipanel\modules\finance\models; | ||
|
||
use hipanel\modules\finance\models\decorators\client\ClientResourceDecoratorFactory; | ||
use hipanel\modules\finance\models\decorators\DecoratedInterface; | ||
use hipanel\modules\finance\models\decorators\ResourceDecoratorInterface; | ||
|
||
class ClientResource extends Resource implements DecoratedInterface | ||
{ | ||
public function decorator(): ResourceDecoratorInterface | ||
{ | ||
if (empty($this->decorator)) { | ||
$this->decorator = ClientResourceDecoratorFactory::createFromResource($this); | ||
} | ||
|
||
return $this->decorator; | ||
} | ||
use HasDecorator; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace hipanel\modules\finance\models; | ||
|
||
use hipanel\modules\finance\models\decorators\ResourceDecoratorFactory; | ||
use hipanel\modules\finance\models\decorators\ResourceDecoratorInterface; | ||
|
||
trait HasDecorator | ||
{ | ||
private ResourceDecoratorInterface $decorator; | ||
|
||
public function decorator(): ResourceDecoratorInterface | ||
{ | ||
if (empty($this->decorator)) { | ||
$this->decorator = ResourceDecoratorFactory::createFromResource($this); | ||
} | ||
|
||
return $this->decorator; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
<?php | ||
<?php declare(strict_types=1); | ||
|
||
namespace hipanel\modules\finance\models; | ||
|
||
use hipanel\modules\finance\models\decorators\DecoratedInterface; | ||
use hipanel\modules\finance\models\decorators\ResourceDecoratorInterface; | ||
use hipanel\modules\finance\models\decorators\target\TargetResourceDecoratorFactory; | ||
|
||
class TargetResource extends Resource implements DecoratedInterface | ||
{ | ||
public function decorator(): ResourceDecoratorInterface | ||
{ | ||
if (empty($this->decorator)) { | ||
$this->decorator = TargetResourceDecoratorFactory::createFromResource($this); | ||
} | ||
|
||
return $this->decorator; | ||
} | ||
use HasDecorator; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
src/models/decorators/client/ClientResourceDecoratorFactory.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
After reviewing the complete class implementation, I can now generate the final response:
Property naming issue confirmed and unused dependency detected
$BillingRegistry
violates PSR naming conventions and should be renamed to$billingRegistry
BillingRegistryInterface
dependency is injected but never used in any of the class methods:create()
,forBill()
,forCharge()
,forConsumption()
,createByType()
, orfixType()
This appears to be an incomplete implementation. Either:
🔗 Analysis chain
Property naming and unused dependency concerns
$BillingRegistry
should follow PSR naming conventions and be in camelCase:$billingRegistry
BillingRegistryInterface
is never used in any of the class methodsApply this diff to fix the property naming:
Let's verify the usage of BillingRegistryInterface in this class:
Let me gather more context about this class to ensure a comprehensive verification.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 153
Script:
Length of output: 5817