Skip to content

Commit c2a4d54

Browse files
committed
Update function acc to new namespace and add doc comment
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
1 parent 14497bd commit c2a4d54

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Shell_Command.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use EE\Utils;
1515
use EE\Model\Site;
16+
use function EE\Site\Utils\auto_site_name;
1617

1718
class Shell_Command extends EE_Command {
1819

@@ -26,7 +27,7 @@ class Shell_Command extends EE_Command {
2627
*/
2728
public function __invoke( $args ) {
2829
EE\Utils\delem_log( 'ee shell start' );
29-
$args = EE\SiteUtils\auto_site_name( $args, 'shell', '' );
30+
$args = auto_site_name( $args, 'shell', '' );
3031
$site_name = EE\Utils\remove_trailing_slash( $args[0] );
3132

3233
$site = Site::find( $site_name, [ 'site_enabled', 'site_fs_path' ] );
@@ -40,6 +41,12 @@ public function __invoke( $args ) {
4041
EE\Utils\delem_log( 'ee shell end' );
4142
}
4243

44+
/**
45+
* Run the command to open shell.
46+
*
47+
* @param string $cmd Command to be executed to open shell.
48+
* @param null|array $descriptors File descriptors for proc.
49+
*/
4350
private function run( $cmd, $descriptors = null ) {
4451
EE\Utils\check_proc_available( 'ee_shell' );
4552
if ( ! $descriptors ) {

0 commit comments

Comments
 (0)