@@ -19,18 +19,23 @@ class ContactsList extends Model
1919 /**
2020 * @var string
2121 */
22- protected $ listId ;
22+ protected string $ listId ;
2323
2424 /**
2525 * @var string
2626 */
27- protected $ action ;
27+ protected string $ action ;
2828
2929 /**
3030 * @var array
3131 */
32- protected $ contacts ;
32+ protected array $ contacts ;
3333
34+ /**
35+ * @param string $listId
36+ * @param string $action
37+ * @param array $contacts
38+ */
3439 public function __construct (string $ listId , string $ action , array $ contacts )
3540 {
3641 if (! $ this ->validateAction ($ action )) {
@@ -62,6 +67,7 @@ public function format(): array
6267
6368 /**
6469 * Get list id
70+ * @return string
6571 */
6672 public function getListId (): string
6773 {
@@ -70,6 +76,7 @@ public function getListId(): string
7076
7177 /**
7278 * Get action.
79+ * @return string
7380 */
7481 public function getAction (): string
7582 {
@@ -78,10 +85,10 @@ public function getAction(): string
7885
7986 /**
8087 * Set action.
81- *
8288 * @param string $action
89+ * @return ContactsList
8390 */
84- public function setAction ($ action ): ContactsList
91+ public function setAction (string $ action ): ContactsList
8592 {
8693 if (! $ this ->validateAction ($ action )) {
8794 throw new RuntimeException ("$ action: is not a valid Action. " );
@@ -94,6 +101,7 @@ public function setAction($action): ContactsList
94101
95102 /**
96103 * Get contacts.
104+ * @return array
97105 */
98106 public function getContacts (): array
99107 {
@@ -107,7 +115,7 @@ public function getContacts(): array
107115 *
108116 * @return bool
109117 */
110- protected function validateAction ($ action ): bool
118+ protected function validateAction (string $ action ): bool
111119 {
112120 $ actionsAvailable = [self ::ACTION_ADDFORCE , self ::ACTION_ADDNOFORCE , self ::ACTION_REMOVE , self ::ACTION_UNSUB ];
113121
0 commit comments