Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

Commit

Permalink
a little useful function addition
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMD committed Jul 5, 2019
1 parent 0b034d4 commit 62881f7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
bin*/*
server.lock
*.log

# Common IDEs
.idea/
nbproject/*

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini

# Mac crap
.DS_Store
/nbproject/private/

# Composer
vendor/*

# Tests
tests/*

virion.php
virion_stub.php
10 changes: 10 additions & 0 deletions src/JackMD/Citation/Command/BaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ public function registerSubCommand(SubCommand $command): void{
}
}

/**
* @param array $args
* @return bool
*/
public function subCommandExists(array $args): bool{
$subCommand = strtolower(array_shift($args));

return isset($this->subCommands[$subCommand]) || isset($this->aliasSubCommands[$subCommand]);
}

/**
* @param CommandSender $sender
* @param array $args
Expand Down

0 comments on commit 62881f7

Please sign in to comment.