[ticket/11150] Fix CS

PHPBB3-11150
This commit is contained in:
Tristan Darricau 2015-12-09 22:44:58 +01:00 committed by Tristan Darricau
parent ea4a4acee0
commit b5136e4976
No known key found for this signature in database
GPG key ID: 817043C2E29DB881
5 changed files with 14 additions and 16 deletions

0
phpBB/ext/index.htm Executable file → Normal file
View file

View file

@ -58,13 +58,20 @@ class html_output_formatter extends \Composer\Console\HtmlOutputFormatter
protected function formatHtml($matches) protected function formatHtml($matches)
{ {
$out = '<span style="'; $out = '<span style="';
foreach (explode(';', $matches[1]) as $code) { foreach (explode(';', $matches[1]) as $code)
if (isset(self::$availableForegroundColors[$code])) { {
if (isset(self::$availableForegroundColors[$code]))
{
$out .= 'color:'.self::$availableForegroundColors[$code].';'; $out .= 'color:'.self::$availableForegroundColors[$code].';';
} elseif (isset(self::$availableBackgroundColors[$code])) { }
elseif (isset(self::$availableBackgroundColors[$code]))
{
$out .= 'background-color:'.self::$availableBackgroundColors[$code].';'; $out .= 'background-color:'.self::$availableBackgroundColors[$code].';';
} elseif (isset(self::$availableOptions[$code])) { }
switch (self::$availableOptions[$code]) { elseif (isset(self::$availableOptions[$code]))
{
switch (self::$availableOptions[$code])
{
case 'bold': case 'bold':
$out .= 'font-weight:bold;'; $out .= 'font-weight:bold;';
break; break;

View file

@ -70,8 +70,7 @@ trait translate_composer_trait
$parameters = [$elements[1]]; $parameters = [$elements[1]];
} }
//$translated_message = $this->language->lang_array($lang_key, $parameters); $translated_message = $this->language->lang_array($lang_key, $parameters);
$translated_message = call_user_func_array([$this->language, 'lang'], array_merge((array)$lang_key, $parameters));
switch ($level) switch ($level)
{ {
@ -226,8 +225,7 @@ trait translate_composer_trait
$error = ''; $error = '';
foreach ($this->composer_error as $error_line) foreach ($this->composer_error as $error_line)
{ {
// $error .= $this->language->lang_array($error_line[0], $error_line[1]); $error .= $this->language->lang_array($error_line[0], $error_line[1]);
$error .= call_user_func_array([$this->language, 'lang'], array_merge((array)$error_line[0], $error_line[1]));
$error .= "\n"; $error .= "\n";
} }

View file

@ -13,13 +13,7 @@
namespace phpbb\console\command\extension; namespace phpbb\console\command\extension;
use Composer\Package\CompletePackage;
use Composer\Package\PackageInterface;
use phpbb\composer\installer;
use phpbb\composer\manager;
use phpbb\composer\manager_interface; use phpbb\composer\manager_interface;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;

View file

@ -15,7 +15,6 @@ namespace phpbb\console\command\extension;
use phpbb\composer\exception\managed_with_error_exception; use phpbb\composer\exception\managed_with_error_exception;
use phpbb\composer\io\console_io; use phpbb\composer\io\console_io;
use phpbb\composer\manager;
use phpbb\composer\manager_interface; use phpbb\composer\manager_interface;
use phpbb\language\language; use phpbb\language\language;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;