forked from fa/breadcrumb-the-shire
instances added god may help
This commit is contained in:
@@ -6,7 +6,7 @@ use MintyPHP\DB;
|
||||
|
||||
class UserExternalIdentityRepository
|
||||
{
|
||||
private static function unwrap($row): ?array
|
||||
private function unwrap($row): ?array
|
||||
{
|
||||
if (!$row || !is_array($row)) {
|
||||
return null;
|
||||
@@ -17,7 +17,7 @@ class UserExternalIdentityRepository
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function findByProviderTidOid(string $provider, string $tid, string $oid): ?array
|
||||
public function findByProviderTidOid(string $provider, string $tid, string $oid): ?array
|
||||
{
|
||||
$row = DB::selectOne(
|
||||
'select id, user_id, provider, oid, tid, issuer, subject, email_at_link_time, created from user_external_identities where provider = ? and tid = ? and oid = ? limit 1',
|
||||
@@ -25,10 +25,10 @@ class UserExternalIdentityRepository
|
||||
$tid,
|
||||
$oid
|
||||
);
|
||||
return self::unwrap($row);
|
||||
return $this->unwrap($row);
|
||||
}
|
||||
|
||||
public static function findByProviderIssuerSubject(string $provider, string $issuer, string $subject): ?array
|
||||
public function findByProviderIssuerSubject(string $provider, string $issuer, string $subject): ?array
|
||||
{
|
||||
$row = DB::selectOne(
|
||||
'select id, user_id, provider, oid, tid, issuer, subject, email_at_link_time, created from user_external_identities where provider = ? and issuer = ? and subject = ? limit 1',
|
||||
@@ -36,10 +36,10 @@ class UserExternalIdentityRepository
|
||||
$issuer,
|
||||
$subject
|
||||
);
|
||||
return self::unwrap($row);
|
||||
return $this->unwrap($row);
|
||||
}
|
||||
|
||||
public static function createLink(array $data)
|
||||
public function createLink(array $data)
|
||||
{
|
||||
return DB::insert(
|
||||
'insert into user_external_identities (user_id, provider, oid, tid, issuer, subject, email_at_link_time, created) values (?,?,?,?,?,?,?,NOW())',
|
||||
|
||||
Reference in New Issue
Block a user