Skip to content

Commit

Permalink
minor #32416 [Console] Update inherit and add licence (Simperfit)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Update inherit and add licence

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | not needed <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

see https://github.com/symfony/symfony/pull/32318/files#r299561556 it needs to be updated in the lowest branch.

Commits
-------

ff0c141 [Console] Update to inherit and add licence
  • Loading branch information
fabpot committed Jul 8, 2019
2 parents ddaf1be + ff0c141 commit f2d7170
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Console\CommandLoader;

use Symfony\Component\Console\Command\Command;
Expand Down
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\Console\CommandLoader;

use Psr\Container\ContainerInterface;
Expand Down
30 changes: 5 additions & 25 deletions src/Symfony/Component/Console/Formatter/OutputFormatterStyle.php
Expand Up @@ -75,11 +75,7 @@ public function __construct($foreground = null, $background = null, array $optio
}

/**
* Sets style foreground color.
*
* @param string|null $color The color name
*
* @throws InvalidArgumentException When the color name isn't defined
* {@inheritdoc}
*/
public function setForeground($color = null)
{
Expand All @@ -97,11 +93,7 @@ public function setForeground($color = null)
}

/**
* Sets style background color.
*
* @param string|null $color The color name
*
* @throws InvalidArgumentException When the color name isn't defined
* {@inheritdoc}
*/
public function setBackground($color = null)
{
Expand All @@ -119,11 +111,7 @@ public function setBackground($color = null)
}

/**
* Sets some specific style option.
*
* @param string $option The option name
*
* @throws InvalidArgumentException When the option name isn't defined
* {@inheritdoc}
*/
public function setOption($option)
{
Expand All @@ -137,11 +125,7 @@ public function setOption($option)
}

/**
* Unsets some specific style option.
*
* @param string $option The option name
*
* @throws InvalidArgumentException When the option name isn't defined
* {@inheritdoc}
*/
public function unsetOption($option)
{
Expand All @@ -168,11 +152,7 @@ public function setOptions(array $options)
}

/**
* Applies the style to a given text.
*
* @param string $text The text to style
*
* @return string
* {@inheritdoc}
*/
public function apply($text)
{
Expand Down
Expand Up @@ -21,7 +21,7 @@ interface OutputFormatterStyleInterface
/**
* Sets style foreground color.
*
* @param string $color The color name
* @param string|null $color The color name
*/
public function setForeground($color = null);

Expand Down

0 comments on commit f2d7170

Please sign in to comment.