Skip to content

Commit ac7d04d

Browse files
Stop using custom formatting tags
1 parent 99bcbf4 commit ac7d04d

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

git-hooks/pre-commit

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ exec 1>&2
55

66
ROOT="$PWD"
77
PHP_CS_FIXER="${ROOT}/bin/php vendor/bin/php-cs-fixer"
8-
PHP_CS_CONFIG="${ROOT}/.php_cs"
9-
10-
if [ ! -f "$PHP_CS_CONFIG" ]; then
11-
echo "Please run 'git commit' from the root directory of the project"
12-
exit 1
13-
fi
148

159
git status --porcelain | grep -e '^[AM]\(.*\).php$' | cut -c 3- | while read line; do
16-
$PHP_CS_FIXER fix --config=$PHP_CS_CONFIG --verbose "$line";
10+
$PHP_CS_FIXER fix --verbose "$line";
1711
git add "$line";
1812
done

src/Bridge/Interaction/CollectionInteractor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private function printHeader(FormInterface $form, OutputInterface $output): void
119119
{
120120
$output->writeln(
121121
strtr(
122-
'<fieldset>{label}</fieldset>',
122+
'<comment>{label}</comment>',
123123
[
124124
'{label}' => FormUtil::label($form),
125125
]
@@ -131,7 +131,7 @@ private function printEditEntryHeader(int $entryNumber, OutputInterface $output)
131131
{
132132
$output->writeln(
133133
strtr(
134-
'<fieldset>Edit entry {entryNumber}</fieldset>',
134+
'<comment>Edit entry {entryNumber}</comment>',
135135
[
136136
'{entryNumber}' => $entryNumber,
137137
]
@@ -143,7 +143,7 @@ private function printAddEntryHeader(int $entryNumber, OutputInterface $output):
143143
{
144144
$output->writeln(
145145
strtr(
146-
'<fieldset>Add entry {entryNumber}</fieldset>',
146+
'<comment>Add entry {entryNumber}</comment>',
147147
[
148148
'{entryNumber}' => $entryNumber,
149149
]

src/Console/Formatter/Format.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class Format
1313
public static function forQuestion(string $question, $defaultValue): string
1414
{
1515
$default = $defaultValue ? strtr(
16-
' [<default>{defaultValue}</default>]',
16+
' [{defaultValue}]',
1717
['{defaultValue}' => (string)$defaultValue]
1818
) : '';
1919

0 commit comments

Comments
 (0)