Skip to content

Commit

Permalink
remove company commandline using code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Aug 23, 2024
1 parent f3e3dbd commit 3c0e8b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
case 'remove':
switch ($argument) {
case 'user':
$engine = new \MultiFlexi\User(intval($identifier));
$engine = new \MultiFlexi\User(is_numeric($identifier) ? intval($identifier) : $identifier );
break;
case 'app':
$engine = new \MultiFlexi\Application(intval($identifier));
break;
case 'company':
$engine = new \MultiFlexi\Company(intval($identifier));
$engine = new \MultiFlexi\Company(is_numeric($identifier) ? intval($identifier) : ['code'=>$identifier], ['autoload'=>'true']);
break;
default:
echo $argv[0] . ' remove <sql row id>';
echo $argv[0] . ' remove <sql row id or other identifier>';
break;
}
$engine->deleteFromSQL();
Expand Down

0 comments on commit 3c0e8b9

Please sign in to comment.