8000 rename Command::private to Command::hidden · symfony/symfony@f900ef0 · GitHub
[go: up one dir, main page]

Skip to content

Commit f900ef0

Browse files
committed
rename Command::private to Command::hidden
1 parent 4eeb1f0 commit f900ef0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Symfony/Component/Console/Command/Command.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Command
3434
private $processTitle;
3535
private $aliases = array();
3636
private $definition;
37-
private $public = true;
37+
private $hidden = false;
3838
private $help;
3939
private $description;
4040
private $ignoreValidationErrors = false;
@@ -448,23 +448,23 @@ public function getName()
448448
}
449449

450450
/**
451-
* @param bool $public Whether the command should be publicly shown or not.
451+
* @param bool $hidden Whether or not the command should be hidden from the list of commands
452452
*
453453
* @return Command The current instance
454454
*/
455-
public function setPublic($public)
455+
public function setHidden($hidden)
456456
{
457-
$this->public = (bool) $public;
457+
$this->hidden = (bool) $hidden;
458458

459459
return $this;
460460
}
461461

462462
/**
463463
* @return bool Whether the command should be publicly shown or not.
464464
*/
465-
public function isPublic()
465+
public function isHidden()
466466
{
467-
return $this->public;
467+
return $this->hidden;
468468
}
469469

470470
/**

src/Symfony/Component/Console/Descriptor/ApplicationDescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function inspectApplication()
112112

113113
/** @var Command $command */
114114
foreach ($commands as $name => $command) {
115-
if (!$command->getName() || !$command->isPublic()) {
115+
if (!$command->getName() || $command->isHidden()) {
116116
continue;
117117
}
118118

src/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected function configure()
2121
->setName('descriptor:command3')
2222
->setDescription('command 3 description')
2323
->setHelp('command 3 help')
24-
->setPublic(false)
24+
->setHidden(true)
2525
;
2626
}
2727
}

0 commit comments

Comments
 (0)
0