/*
* This file is part of Psy Shell.
*
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
public function setApplication(Application $application = null)
{
if ($application !== null && !$application instanceof Shell) {
- throw new \InvalidArgumentException('PsySH Commands require an instance of Psy\Shell.');
+ throw new \InvalidArgumentException('PsySH Commands require an instance of Psy\Shell');
}
return parent::setApplication($application);
*/
public function asText()
{
- $messages = array(
+ $messages = [
'<comment>Usage:</comment>',
' ' . $this->getSynopsis(),
'',
- );
+ ];
if ($this->getAliases()) {
$messages[] = $this->aliasesAsText();
*/
protected function getHiddenArguments()
{
- return array('command');
+ return ['command'];
}
/**
*/
protected function getHiddenOptions()
{
- return array('verbose');
+ return ['verbose'];
}
/**
private function argumentsAsText()
{
$max = $this->getMaxWidth();
- $messages = array();
+ $messages = [];
$arguments = $this->getArguments();
if (!empty($arguments)) {
private function optionsAsText()
{
$max = $this->getMaxWidth();
- $messages = array();
+ $messages = [];
$options = $this->getOptions();
if ($options) {
$table = new Table($output);
return $table
- ->setRows(array())
+ ->setRows([])
->setStyle($style);
}
$table = $this->getApplication()->getHelperSet()->get('table');
return $table
- ->setRows(array())
+ ->setRows([])
->setLayout(TableHelper::LAYOUT_BORDERLESS)
->setHorizontalBorderChar('')
->setCrossingChar('');