Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
19ba4873
Commit
19ba4873
authored
Oct 13, 2021
by
Michael Iseard
Browse files
Remove redundant methods
parent
875d90fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Entity/DonorEntity.php
View file @
19ba4873
...
...
@@ -68,19 +68,4 @@ class DonorEntity extends AbstractEntity {
*/
public
$customer_id
;
/**
* Gets all transactions for current user
*
* @return TransactionEntity|null
*/
public
function
get_transactions
():
?TransactionEntity
{
$mapper
=
new
MapperService
(
TransactionEntity
::
class
);
/** @var TransactionEntity $transactions */
$transactions
=
$mapper
->
get_all_by
(
[
'customer_id'
=>
$this
->
customer_id
]
);
return
$transactions
??
null
;
}
}
app/Entity/SubscriptionEntity.php
View file @
19ba4873
...
...
@@ -60,20 +60,4 @@ class SubscriptionEntity extends AbstractEntity {
* @var string
*/
public
$subscription_id
;
/**
* Gets donor associated with subscription
*
* @return DonorEntity|null
* @since 2.0.0
*/
public
function
get_donor
():
?EntityInterface
{
$mapper
=
new
MapperService
(
DonorEntity
::
class
);
/** @var DonorEntity $donor */
$donor
=
$mapper
->
get_one_by
(
[
'customer_id'
=>
$this
->
customer_id
]
);
return
$donor
??
null
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment