updated packages
This commit is contained in:
@@ -20,12 +20,12 @@ return function (InputInterface $input, OutputInterface $output) {
|
||||
|
||||
//Ensure edge case by appending empty strings to history:
|
||||
$output->write('Lorem ipsum dolor sit amet');
|
||||
$output->write(array('', '', ''));
|
||||
$output->write(['', '', '']);
|
||||
$output->title('Fourth title');
|
||||
|
||||
//Ensure have manual control over number of blank lines:
|
||||
$output->writeln('Lorem ipsum dolor sit amet');
|
||||
$output->writeln(array('', '')); //Should append an extra blank line
|
||||
$output->writeln(['', '']); //Should append an extra blank line
|
||||
$output->title('Fifth title');
|
||||
|
||||
$output->writeln('Lorem ipsum dolor sit amet');
|
||||
|
||||
@@ -20,12 +20,12 @@ return function (InputInterface $input, OutputInterface $output) {
|
||||
|
||||
//Ensure edge case by appending empty strings to history:
|
||||
$output->write('Lorem ipsum dolor sit amet');
|
||||
$output->write(new \ArrayIterator(array('', '', '')));
|
||||
$output->write(new \ArrayIterator(['', '', '']));
|
||||
$output->title('Fourth title');
|
||||
|
||||
//Ensure have manual control over number of blank lines:
|
||||
$output->writeln('Lorem ipsum dolor sit amet');
|
||||
$output->writeln(new \ArrayIterator(array('', ''))); //Should append an extra blank line
|
||||
$output->writeln(new \ArrayIterator(['', ''])); //Should append an extra blank line
|
||||
$output->title('Fifth title');
|
||||
|
||||
$output->writeln('Lorem ipsum dolor sit amet');
|
||||
|
||||
@@ -9,29 +9,29 @@ return function (InputInterface $input, OutputInterface $output) {
|
||||
$output = new SymfonyStyle($input, $output);
|
||||
|
||||
$output->writeln('Lorem ipsum dolor sit amet');
|
||||
$output->listing(array(
|
||||
$output->listing([
|
||||
'Lorem ipsum dolor sit amet',
|
||||
'consectetur adipiscing elit',
|
||||
));
|
||||
]);
|
||||
|
||||
//Even using write:
|
||||
$output->write('Lorem ipsum dolor sit amet');
|
||||
$output->listing(array(
|
||||
$output->listing([
|
||||
'Lorem ipsum dolor sit amet',
|
||||
'consectetur adipiscing elit',
|
||||
));
|
||||
]);
|
||||
|
||||
$output->write('Lorem ipsum dolor sit amet');
|
||||
$output->text(array(
|
||||
$output->text([
|
||||
'Lorem ipsum dolor sit amet',
|
||||
'consectetur adipiscing elit',
|
||||
));
|
||||
]);
|
||||
|
||||
$output->newLine();
|
||||
|
||||
$output->write('Lorem ipsum dolor sit amet');
|
||||
$output->comment(array(
|
||||
$output->comment([
|
||||
'Lorem ipsum dolor sit amet',
|
||||
'consectetur adipiscing elit',
|
||||
));
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -8,9 +8,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
return function (InputInterface $input, OutputInterface $output) {
|
||||
$output = new SymfonyStyle($input, $output);
|
||||
|
||||
$output->listing(array(
|
||||
$output->listing([
|
||||
'Lorem ipsum dolor sit amet',
|
||||
'consectetur adipiscing elit',
|
||||
));
|
||||
]);
|
||||
$output->success('Lorem ipsum dolor sit amet');
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ return function (InputInterface $input, OutputInterface $output) {
|
||||
$output = new SymfonyStyle($input, $output);
|
||||
$output->title('Title');
|
||||
$output->askHidden('Hidden question');
|
||||
$output->choice('Choice question with default', array('choice1', 'choice2'), 'choice1');
|
||||
$output->choice('Choice question with default', ['choice1', 'choice2'], 'choice1');
|
||||
$output->confirm('Confirmation with yes default', true);
|
||||
$output->text('Duis aute irure dolor in reprehenderit in voluptate velit esse');
|
||||
};
|
||||
|
||||
@@ -7,19 +7,19 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
//Ensure formatting tables when using multiple headers with TableCell
|
||||
return function (InputInterface $input, OutputInterface $output) {
|
||||
$headers = array(
|
||||
array(new TableCell('Main table title', array('colspan' => 3))),
|
||||
array('ISBN', 'Title', 'Author'),
|
||||
);
|
||||
$headers = [
|
||||
[new TableCell('Main table title', ['colspan' => 3])],
|
||||
['ISBN', 'Title', 'Author'],
|
||||
];
|
||||
|
||||
$rows = array(
|
||||
array(
|
||||
$rows = [
|
||||
[
|
||||
'978-0521567817',
|
||||
'De Monarchia',
|
||||
new TableCell("Dante Alighieri\nspans multiple rows", array('rowspan' => 2)),
|
||||
),
|
||||
array('978-0804169127', 'Divine Comedy'),
|
||||
);
|
||||
new TableCell("Dante Alighieri\nspans multiple rows", ['rowspan' => 2]),
|
||||
],
|
||||
['978-0804169127', 'Divine Comedy'],
|
||||
];
|
||||
|
||||
$output = new SymfonyStyle($input, $output);
|
||||
$output->table($headers, $rows);
|
||||
|
||||
@@ -7,5 +7,5 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
//Ensure that all lines are aligned to the begin of the first line in a multi-line block
|
||||
return function (InputInterface $input, OutputInterface $output) {
|
||||
$output = new SymfonyStyle($input, $output);
|
||||
$output->block(array('Custom block', 'Second custom block line'), 'CUSTOM', 'fg=white;bg=green', 'X ', true);
|
||||
$output->block(['Custom block', 'Second custom block line'], 'CUSTOM', 'fg=white;bg=green', 'X ', true);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user