@@ -65,7 +65,7 @@ public function getConnection()
6565 * @param array $connection
6666 * @return array
6767 */
68- public function getArgs ($ connection )
68+ public function getArgs (array $ connection )
6969 {
7070 $ driver = ucfirst ($ connection ['driver ' ]);
7171
@@ -78,7 +78,7 @@ public function getArgs($connection)
7878 * @param array $connection
7979 * @return array|null
8080 */
81- public function getEnv ($ connection )
81+ public function getEnv (array $ connection )
8282 {
8383 $ driver = ucfirst ($ connection ['driver ' ]);
8484
@@ -95,13 +95,13 @@ public function getEnv($connection)
9595 * @param array $connection
9696 * @return string
9797 */
98- public function getCommand ($ connection )
98+ public function getCommand (array $ connection )
9999 {
100100 return [
101- 'mysql ' => 'mysql ' ,
102- 'pgsql ' => 'psql ' ,
103- 'sqlite ' => 'sqlite3 ' ,
104- 'sqlsrv ' => 'sqlcmd ' ,
101+ 'mysql ' => 'mysql ' ,
102+ 'pgsql ' => 'psql ' ,
103+ 'sqlite ' => 'sqlite3 ' ,
104+ 'sqlsrv ' => 'sqlcmd ' ,
105105 ][$ connection ['driver ' ]];
106106 }
107107
@@ -111,16 +111,16 @@ public function getCommand($connection)
111111 * @param array $connection
112112 * @return array
113113 */
114- protected function getMysqlArgs ($ connection )
114+ protected function getMysqlArgs (array $ connection )
115115 {
116116 return array_merge ([
117117 '--host= ' .$ connection ['host ' ],
118118 '--port= ' .$ connection ['port ' ],
119119 '--user= ' .$ connection ['username ' ],
120120 ], $ this ->buildOptionalArguments ([
121- 'password ' => '--password= ' .$ connection ['password ' ],
122- 'unix_socket ' => '--socket= ' .$ connection ['unix_socket ' ],
123- 'charset ' => '--default-character-set= ' .$ connection ['charset ' ],
121+ 'password ' => '--password= ' .$ connection ['password ' ],
122+ 'unix_socket ' => '--socket= ' .$ connection ['unix_socket ' ],
123+ 'charset ' => '--default-character-set= ' .$ connection ['charset ' ],
124124 ], $ connection ), [$ connection ['database ' ]]);
125125 }
126126
@@ -130,7 +130,7 @@ protected function getMysqlArgs($connection)
130130 * @param array $connection
131131 * @return array
132132 */
133- protected function getPgsqlArgs ($ connection )
133+ protected function getPgsqlArgs (array $ connection )
134134 {
135135 return [$ connection ['database ' ]];
136136 }
@@ -141,7 +141,7 @@ protected function getPgsqlArgs($connection)
141141 * @param array $connection
142142 * @return array
143143 */
144- protected function getSqliteArgs ($ connection )
144+ protected function getSqliteArgs (array $ connection )
145145 {
146146 return [$ connection ['database ' ]];
147147 }
@@ -152,14 +152,14 @@ protected function getSqliteArgs($connection)
152152 * @param array $connection
153153 * @return array
154154 */
155- protected function getSqlsrvArgs ($ connection )
155+ protected function getSqlsrvArgs (array $ connection )
156156 {
157157 return $ this ->buildOptionalArguments ([
158- 'database ' => '-d ' .$ connection ['database ' ],
159- 'username ' => '-U ' .$ connection ['username ' ],
160- 'password ' => '-P ' .$ connection ['password ' ],
161- 'host ' => '-S tcp: ' .$ connection ['host ' ]
162- .($ connection ['port ' ] ? ', ' .$ connection ['port ' ] : '' ),
158+ 'database ' => '-d ' .$ connection ['database ' ],
159+ 'username ' => '-U ' .$ connection ['username ' ],
160+ 'password ' => '-P ' .$ connection ['password ' ],
161+ 'host ' => '-S tcp: ' .$ connection ['host ' ]
162+ .($ connection ['port ' ] ? ', ' .$ connection ['port ' ] : '' ),
163163 ], $ connection );
164164 }
165165
@@ -169,13 +169,13 @@ protected function getSqlsrvArgs($connection)
169169 * @param array $connection
170170 * @return array|null
171171 */
172- protected function getpgsqlEnv ($ connection )
172+ protected function getpgsqlEnv (array $ connection )
173173 {
174174 return array_merge (...$ this ->buildOptionalArguments ([
175- 'username ' => ['PGUSER ' => $ connection ['username ' ]],
176- 'host ' => ['PGHOST ' => $ connection ['host ' ]],
177- 'port ' => ['PGPORT ' => $ connection ['port ' ]],
178- 'password ' => ['PGPASSWORD ' => $ connection ['password ' ]],
175+ 'username ' => ['PGUSER ' => $ connection ['username ' ]],
176+ 'host ' => ['PGHOST ' => $ connection ['host ' ]],
177+ 'port ' => ['PGPORT ' => $ connection ['port ' ]],
178+ 'password ' => ['PGPASSWORD ' => $ connection ['password ' ]],
179179 ], $ connection ));
180180 }
181181
@@ -186,7 +186,7 @@ protected function getpgsqlEnv($connection)
186186 * @param array $connection
187187 * @return array
188188 */
189- protected function buildOptionalArguments ($ args , $ connection )
189+ protected function buildOptionalArguments (array $ args ,array $ connection )
190190 {
191191 return array_values (array_filter ($ args , function ($ key ) use ($ connection ) {
192192 return ! empty ($ connection [$ key ]);
0 commit comments