mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Use static class names instead of strings when getting objects from the DB
This commit is contained in:
parent
a442f92e28
commit
acb6b2949f
16 changed files with 36 additions and 34 deletions
|
@ -26,7 +26,7 @@ $expiredPatrons = Db::Query('
|
|||
(IsRecurring = false and Amount >= 100 and Created > ? - interval 1 year)
|
||||
)
|
||||
)
|
||||
', [$now, $now], 'Patron');
|
||||
', [$now, $now], Patron::class);
|
||||
|
||||
if(sizeof($expiredPatrons) > 0){
|
||||
$ebooksThisYear = 0;
|
||||
|
@ -70,7 +70,7 @@ if(sizeof($expiredPatrons) > 0){
|
|||
where UserId = ?
|
||||
order by Created desc
|
||||
limit 1
|
||||
', [$patron->UserId], 'Payment');
|
||||
', [$patron->UserId], Payment::class);
|
||||
|
||||
if(sizeof($lastPayment) > 0 && $patron->User->Email !== null){
|
||||
$em = new Email();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue