@@ -23,7 +23,7 @@ class Module4 extends CLI
2323 const TABLE_WIDTH = ['9 ' , '* ' ];
2424 const TABLE_STYLE = [Colors::C_CYAN , Colors::C_GREEN ];
2525
26- protected function setup (Options $ options )
26+ protected function setup (Options $ options ): void
2727 {
2828 $ options ->setHelp ('This client is built to operate against the server defined in Module 4 only. ' );
2929
@@ -58,7 +58,7 @@ protected function setup(Options $options)
5858 $ this ->token = @file_get_contents ('.session ' );
5959 }
6060
61- protected function createNote ($ contents )
61+ protected function createNote (string $ contents ): void
6262 {
6363 if (empty ($ this ->token )) {
6464 $ this ->error ('Please log in first! ' );
@@ -103,7 +103,7 @@ private function initTable(): TableFormatter
103103 return $ tf ;
104104 }
105105
106- private function printNote (array $ note , TableFormatter $ tf )
106+ private function printNote (array $ note , TableFormatter $ tf ): void
107107 {
108108 echo $ tf ->format (
109109 self ::TABLE_WIDTH ,
@@ -124,7 +124,7 @@ private function printNote(array $note, TableFormatter $tf)
124124 );
125125 }
126126
127- protected function getNote ($ noteId )
127+ protected function getNote (string $ noteId ): void
128128 {
129129 if (empty ($ this ->token )) {
130130 $ this ->error ('Please log in first! ' );
@@ -150,7 +150,7 @@ protected function getNote($noteId)
150150 }
151151 }
152152
153- protected function deleteNote ($ noteId )
153+ protected function deleteNote (string $ noteId ): void
154154 {
155155 if (empty ($ this ->token )) {
156156 $ this ->error ('Please log in first! ' );
@@ -169,7 +169,7 @@ protected function deleteNote($noteId)
169169 }
170170 }
171171
172- protected function getAllNotes ()
172+ protected function getAllNotes (): void
173173 {
174174 if (empty ($ this ->token )) {
175175 $ this ->error ('Please log in first! ' );
@@ -197,7 +197,7 @@ protected function getAllNotes()
197197 }
198198 }
199199
200- protected function register (Options $ options )
200+ protected function register (Options $ options ): void
201201 {
202202 $ email = $ options ->getOpt ('email ' );
203203 $ password = $ options ->getOpt ('password ' );
@@ -242,7 +242,7 @@ protected function register(Options $options)
242242 }
243243 }
244244
245- protected function changePassword (Options $ options )
245+ protected function changePassword (Options $ options ): void
246246 {
247247 $ email = $ options ->getOpt ('email ' );
248248 $ oldPassword = $ options ->getOpt ('old-password ' );
@@ -284,7 +284,7 @@ protected function changePassword(Options $options)
284284 }
285285 }
286286
287- protected function login (Options $ options )
287+ protected function login (Options $ options ): void
288288 {
289289 try {
290290 $ response = $ this ->client ->request ('GET ' , 'login ' , ['auth ' => [$ this ->user , $ this ->pass ]]);
@@ -313,7 +313,7 @@ protected function login(Options $options)
313313 }
314314 }
315315
316- protected function main (Options $ options )
316+ protected function main (Options $ options ): void
317317 {
318318 $ args = $ options ->getArgs ();
319319 $ this ->user = $ options ->getOpt ('email ' );
0 commit comments