-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 apparently previous director data is now completely different
- Loading branch information
1 parent
4975326
commit ab468af
Showing
3 changed files
with
85 additions
and
26 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace SynergiTech\Creditsafe\Models\Company; | ||
|
||
use SynergiTech\Creditsafe\Models\Company; | ||
|
||
/** | ||
* This class contains all data relating to a Previous Director of a Company | ||
*/ | ||
class PreviousDirector | ||
{ | ||
protected $company; | ||
protected $directorDetails; | ||
|
||
/** | ||
* @param Company $company Used to store a company data in the Director Class | ||
* @param array $directorDetails Directors Data that needs to be stored in the Director Class | ||
*/ | ||
public function __construct(Company $company, array $directorDetails) | ||
{ | ||
$this->company = $company; | ||
$this->directorDetails = $directorDetails; | ||
} | ||
|
||
/** | ||
* @deprecated in favour of checking class | ||
*/ | ||
public function isCurrent(): bool | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* @deprecated in favour of checking class | ||
*/ | ||
public function isPrevious(): bool | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* @return string the ID of the Previous Director | ||
*/ | ||
public function getID(): string | ||
{ | ||
return $this->directorDetails['id'] ?? ''; | ||
} | ||
|
||
/** | ||
* @return string the gender of the Previous Director | ||
*/ | ||
public function getGender(): string | ||
{ | ||
return $this->directorDetails['gender'] ?? ''; | ||
} | ||
|
||
/** | ||
* @return string the name of the Previous Director | ||
*/ | ||
public function getName(): string | ||
{ | ||
return $this->directorDetails['name'] ?? ''; | ||
} | ||
} |