@@ -10,13 +10,8 @@ trait ArtisanAsserts
1010{
1111 /**
1212 * Add expectation that the given confirmation question would be shown.
13- *
14- * @param string $question
15- * @param string $command
16- * @param array $parameters
17- * @return void
1813 */
19- protected function willSeeConfirmation (string $ question , string $ command , array $ parameters = [])
14+ protected function willSeeConfirmation (string $ question , string $ command , array $ parameters = []): void
2015 {
2116 $ mock = Mockery::mock ("{$ command }[confirm] " );
2217 $ mock ->shouldReceive ('confirm ' )->once ()->with ($ question );
@@ -26,13 +21,8 @@ protected function willSeeConfirmation(string $question, string $command, array
2621
2722 /**
2823 * Add expectation that the given confirmation question would not be shown.
29- *
30- * @param string $question
31- * @param string $command
32- * @param array $parameters
33- * @return void
3424 */
35- protected function willNotSeeConfirmation (string $ question , string $ command , array $ parameters = [])
25+ protected function willNotSeeConfirmation (string $ question , string $ command , array $ parameters = []): void
3626 {
3727 $ mock = Mockery::mock ("{$ command }[confirm] " );
3828 $ mock ->shouldNotReceive ('confirm ' )->with ($ question );
@@ -42,13 +32,8 @@ protected function willNotSeeConfirmation(string $question, string $command, arr
4232
4333 /**
4434 * Add expectation that the given confirmation question would be shown, and accept it.
45- *
46- * @param string $question
47- * @param string $command
48- * @param array $parameters
49- * @return void
5035 */
51- protected function willGiveConfirmation (string $ question , string $ command , array $ parameters = [])
36+ protected function willGiveConfirmation (string $ question , string $ command , array $ parameters = []): void
5237 {
5338 $ mock = Mockery::mock ("{$ command }[confirm] " );
5439 $ mock ->shouldReceive ('confirm ' )->once ()->with ($ question )->andReturn (true );
@@ -58,13 +43,8 @@ protected function willGiveConfirmation(string $question, string $command, array
5843
5944 /**
6045 * Add expectation that the given confirmation question would be shown, and do not accept it.
61- *
62- * @param string $question
63- * @param string $command
64- * @param array $parameters
65- * @return void
6646 */
67- protected function willNotGiveConfirmation (string $ question , string $ command , array $ parameters = [])
47+ protected function willNotGiveConfirmation (string $ question , string $ command , array $ parameters = []): void
6848 {
6949 $ mock = Mockery::mock ("{$ command }[confirm] " );
7050 $ mock ->shouldReceive ('confirm ' )->once ()->with ($ question )->andReturn (false );
@@ -74,11 +54,8 @@ protected function willNotGiveConfirmation(string $question, string $command, ar
7454
7555 /**
7656 * Assert that the given artisan output is seen.
77- *
78- * @param string $output
79- * @return void
8057 */
81- protected function seeArtisanOutput (string $ output )
58+ protected function seeArtisanOutput (string $ output ): void
8259 {
8360 if (File::exists ($ output )) {
8461 $ output = File::get ($ output );
@@ -91,11 +68,8 @@ protected function seeArtisanOutput(string $output)
9168
9269 /**
9370 * Assert that the given artisan output is not seen.
94- *
95- * @param string $output
96- * @return void
9771 */
98- protected function dontSeeArtisanOutput (string $ output )
72+ protected function dontSeeArtisanOutput (string $ output ): void
9973 {
10074 if (File::exists ($ output )) {
10175 $ output = File::get ($ output );
@@ -108,11 +82,8 @@ protected function dontSeeArtisanOutput(string $output)
10882
10983 /**
11084 * Assert that the given string is seen in the artisan output.
111- *
112- * @param string $needle
113- * @return void
11485 */
115- protected function seeInArtisanOutput (string $ needle )
86+ protected function seeInArtisanOutput (string $ needle ): void
11687 {
11788 if (File::exists ($ needle )) {
11889 $ needle = File::get ($ needle );
@@ -125,11 +96,8 @@ protected function seeInArtisanOutput(string $needle)
12596
12697 /**
12798 * Assert that the given string is not seen in the artisan output.
128- *
129- * @param string $needle
130- * @return void
13199 */
132- protected function dontSeeInArtisanOutput (string $ needle )
100+ protected function dontSeeInArtisanOutput (string $ needle ): void
133101 {
134102 if (File::exists ($ needle )) {
135103 $ needle = File::get ($ needle );
@@ -142,47 +110,35 @@ protected function dontSeeInArtisanOutput(string $needle)
142110
143111 /**
144112 * Assert that the given data is seen in the artisan table output.
145- *
146- * @param array $data
147- * @return void
148113 */
149- protected function seeArtisanTableOutput (array $ data )
114+ protected function seeArtisanTableOutput (array $ data ): void
150115 {
151116 $ message = 'Failed asserting that artisan table output consists of expected data. ' ;
152117 $ this ->assertEquals ($ data , $ this ->parseArtisanTableOutput ($ this ->getArtisanOutput ()), $ message );
153118 }
154119
155120 /**
156121 * Assert that the given data is not seen in the artisan table output.
157- *
158- * @param array $data
159- * @return void
160122 */
161- protected function dontSeeArtisanTableOutput (array $ data )
123+ protected function dontSeeArtisanTableOutput (array $ data ): void
162124 {
163125 $ message = 'Failed asserting that artisan table output not consists of expected data. ' ;
164126 $ this ->assertNotEquals ($ data , $ this ->parseArtisanTableOutput ($ this ->getArtisanOutput ()), $ message );
165127 }
166128
167129 /**
168130 * Assert that the artisan table output has the given number of data rows.
169- *
170- * @param int $count
171- * @return void
172131 */
173- protected function seeArtisanTableRowsCount (int $ count )
132+ protected function seeArtisanTableRowsCount (int $ count ): void
174133 {
175134 $ message = "Failed asserting that artisan table rows count equals to ` {$ count }`. " ;
176135 $ this ->assertCount ($ count , $ this ->parseArtisanTableOutput ($ this ->getArtisanOutput ()), $ message );
177136 }
178137
179138 /**
180139 * Assert that the artisan table output doesn't have the given number of data rows.
181- *
182- * @param int $count
183- * @return void
184140 */
185- protected function dontSeeArtisanTableRowsCount (int $ count )
141+ protected function dontSeeArtisanTableRowsCount (int $ count ): void
186142 {
187143 $ message = "Failed asserting that artisan table rows count not equals to ` {$ count }`. " ;
188144 $ this ->assertNotCount ($ count , $ this ->parseArtisanTableOutput ($ this ->getArtisanOutput ()), $ message );
@@ -192,11 +148,8 @@ protected function dontSeeArtisanTableRowsCount(int $count)
192148 * Parse the artisan table output.
193149 *
194150 * Return data rows with headers as keys.
195- *
196- * @param string $output
197- * @return array
198151 */
199- private function parseArtisanTableOutput (string $ output )
152+ private function parseArtisanTableOutput (string $ output ): array
200153 {
201154 $ output = explode ("\n" , trim ($ output ));
202155
0 commit comments