| Total Complexity | 2 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Registration |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var string Route where your user will register into La Presse Libre platform. |
||
| 20 | */ |
||
| 21 | const LINK_ROUTE = 'https://www.lapresselibre.fr/inscription-partenaire'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var int |
||
| 25 | */ |
||
| 26 | private $public_key; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var Encryption |
||
| 30 | */ |
||
| 31 | private $encryption; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param int $public_key |
||
| 35 | * @param Encryption $encryption |
||
| 36 | */ |
||
| 37 | public function __construct($public_key, Encryption $encryption) |
||
| 38 | { |
||
| 39 | $this->public_key = $public_key; |
||
| 40 | $this->encryption = $encryption; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Generate the link that allows you former users to |
||
| 45 | * register themselves into La Presse Libre platform. |
||
| 46 | * |
||
| 47 | * @param string $email |
||
| 48 | * @param string $userName |
||
| 49 | * @param string $guid |
||
| 50 | * @see https://github.com/NextINpact/LaPresseLibreSDK/wiki/Int%C3%A9gration-et-configuration-du-SDK#inscription-%C3%A0-la-presse-libre-depuis-une-plateforme-partenaire |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function generateLink($email, $userName, $guid = null) |
||
| 70 | ); |
||
| 71 | } |
||
| 73 |