mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Ignore basic methods, improving code coverage.
This commit is contained in:
@@ -27,6 +27,7 @@ use Carbon\Carbon;
|
||||
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class Login
|
||||
*/
|
||||
class Login extends SpectreObject
|
||||
@@ -68,6 +69,34 @@ class Login extends SpectreObject
|
||||
/** @var Carbon */
|
||||
private $updatedAt;
|
||||
|
||||
/**
|
||||
* Login constructor.
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->consentGivenAt = new Carbon($data['consent_given_at']);
|
||||
$this->consentTypes = $data['consent_types'];
|
||||
$this->countryCode = $data['country_code'];
|
||||
$this->createdAt = new Carbon($data['created_at']);
|
||||
$this->updatedAt = new Carbon($data['updated_at']);
|
||||
$this->customerId = $data['customer_id'];
|
||||
$this->dailyRefresh = $data['daily_refresh'];
|
||||
$this->holderInfo = new Holder($data['holder_info']);
|
||||
$this->id = (int)$data['id'];
|
||||
$this->lastAttempt = new Attempt($data['last_attempt']);
|
||||
$this->lastSuccessAt = new Carbon($data['last_success_at']);
|
||||
$this->nextRefreshPossibleAt = new Carbon($data['next_refresh_possible_at']);
|
||||
$this->providerCode = $data['provider_code'];
|
||||
$this->providerId = $data['provider_id'];
|
||||
$this->providerName = $data['provider_name'];
|
||||
$this->showConsentConfirmation = $data['show_consent_confirmation'];
|
||||
$this->status = $data['status'];
|
||||
$this->storeCredentials = $data['store_credentials'];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -76,6 +105,22 @@ class Login extends SpectreObject
|
||||
return $this->countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attempt
|
||||
*/
|
||||
public function getLastAttempt(): Attempt
|
||||
{
|
||||
return $this->lastAttempt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Carbon
|
||||
*/
|
||||
@@ -108,53 +153,6 @@ class Login extends SpectreObject
|
||||
return $this->updatedAt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Login constructor.
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->consentGivenAt = new Carbon($data['consent_given_at']);
|
||||
$this->consentTypes = $data['consent_types'];
|
||||
$this->countryCode = $data['country_code'];
|
||||
$this->createdAt = new Carbon($data['created_at']);
|
||||
$this->updatedAt = new Carbon($data['updated_at']);
|
||||
$this->customerId = $data['customer_id'];
|
||||
$this->dailyRefresh = $data['daily_refresh'];
|
||||
$this->holderInfo = new Holder($data['holder_info']);
|
||||
$this->id = (int)$data['id'];
|
||||
$this->lastAttempt = new Attempt($data['last_attempt']);
|
||||
$this->lastSuccessAt = new Carbon($data['last_success_at']);
|
||||
$this->nextRefreshPossibleAt = new Carbon($data['next_refresh_possible_at']);
|
||||
$this->providerCode = $data['provider_code'];
|
||||
$this->providerId = $data['provider_id'];
|
||||
$this->providerName = $data['provider_name'];
|
||||
$this->showConsentConfirmation = $data['show_consent_confirmation'];
|
||||
$this->status = $data['status'];
|
||||
$this->storeCredentials = $data['store_credentials'];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attempt
|
||||
*/
|
||||
public function getLastAttempt(): Attempt
|
||||
{
|
||||
return $this->lastAttempt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user