You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -410,7 +407,7 @@ public function addOption($name, $shortcut = null, $mode = null, $description =
410
407
*
411
408
* @throws InvalidArgumentException When the name is invalid
412
409
*/
413
-
publicfunctionsetName($name)
410
+
publicfunctionsetName(string$name)
414
411
{
415
412
$this->validateName($name);
416
413
@@ -431,7 +428,7 @@ public function setName($name)
431
428
*
432
429
* @return $this
433
430
*/
434
-
publicfunctionsetProcessTitle($title)
431
+
publicfunctionsetProcessTitle(string$title)
435
432
{
436
433
$this->processTitle = $title;
437
434
@@ -453,9 +450,9 @@ public function getName()
453
450
*
454
451
* @return Command The current instance
455
452
*/
456
-
publicfunctionsetHidden($hidden)
453
+
publicfunctionsetHidden(bool$hidden)
457
454
{
458
-
$this->hidden = (bool) $hidden;
455
+
$this->hidden = $hidden;
459
456
460
457
return$this;
461
458
}
@@ -475,7 +472,7 @@ public function isHidden()
475
472
*
476
473
* @return $this
477
474
*/
478
-
publicfunctionsetDescription($description)
475
+
publicfunctionsetDescription(string$description)
479
476
{
480
477
$this->description = $description;
481
478
@@ -499,7 +496,7 @@ public function getDescription()
499
496
*
500
497
* @retu
D30D
rn $this
501
498
*/
502
-
publicfunctionsetHelp($help)
499
+
publicfunctionsetHelp(string$help)
503
500
{
504
501
$this->help = $help;
505
502
@@ -548,12 +545,8 @@ public function getProcessedHelp()
548
545
*
549
546
* @throws InvalidArgumentException When an alias is invalid
550
547
*/
551
-
publicfunctionsetAliases($aliases)
548
+
publicfunctionsetAliases(array$aliases)
552
549
{
553
-
if (!\is_array($aliases) && !$aliasesinstanceof \Traversable) {
554
-
thrownewInvalidArgumentException('$aliases must be an array or an instance of \Traversable');
555
-
}
556
-
557
550
foreach ($aliasesas$alias) {
558
551
$this->validateName($alias);
559
552
}
@@ -580,7 +573,7 @@ public function getAliases()
580
573
*
581
574
* @return string The synopsis
582
575
*/
583
-
publicfunctiongetSynopsis($short = false)
576
+
publicfunctiongetSynopsis(bool$short = false)
584
577
{
585
578
$key = $short ? 'short' : 'long';
586
579
@@ -598,7 +591,7 @@ public function getSynopsis($short = false)
598
591
*
599
592
* @return $this
600
593
*/
601
-
publicfunctionaddUsage($usage)
594
+
publicfunctionaddUsage(string$usage)
602
595
{
603
596
if (0 !== strpos($usage, $this->name)) {
604
597
$usage = sprintf('%s %s', $this->name, $usage);
@@ -629,7 +622,7 @@ public function getUsages()
629
622
* @throws LogicException if no HelperSet is defined
630
623
* @throws InvalidArgumentException if the helper is not defined
631
624
*/
632
-
publicfunctiongetHelper($name)
625
+
publicfunctiongetHelper(string$name)
633
626
{
634
627
if (null === $this->helperSet) {
635
628
thrownewLogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
0 commit comments