Skip to content

Commit 56813e5

Browse files
Merge branch '4.4' into 5.2
* 4.4: [Inflector][String] wrong plural form of words ending by "pectus" [HttpClient] Don't prepare the request in ScopingHttpClient [Console] Fixes for PHP 8.1 deprecations Fix/Rewrite .gitignore regex builder
2 parents 5de9fba + 1ab187a commit 56813e5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected function describeInputDefinition(InputDefinition $definition, array $o
117117

118118
$this->writeText('<comment>Options:</comment>', $options);
119119
foreach ($definition->getOptions() as $option) {
120-
if (\strlen($option->getShortcut()) > 1) {
120+
if (\strlen($option->getShortcut() ?? '') > 1) {
121121
$laterOptions[] = $option;
122122
continue;
123123
}

Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private function getInputOptionDocument(InputOption $option): \DOMDocument
200200

201201
$dom->appendChild($objectXML = $dom->createElement('option'));
202202
$objectXML->setAttribute('name', '--'.$option->getName());
203-
$pos = strpos($option->getShortcut(), '|');
203+
$pos = strpos($option->getShortcut() ?? '', '|');
204204
if (false !== $pos) {
205205
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
206206
$objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));

Helper/ProgressIndicator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private function display()
185185
}
186186

187187
return $matches[0];
188-
}, $this->format));
188+
}, $this->format ?? ''));
189189
}
190190

191191
private function determineBestFormat(): string

Helper/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ private function buildTableRows(array $rows): TableRows
572572
if (isset($this->columnMaxWidths[$column]) && Helper::strlenWithoutDecoration($formatter, $cell) > $this->columnMaxWidths[$column]) {
573573
$cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan);
574574
}
575-
if (!strstr($cell, "\n")) {
575+
if (!strstr($cell ?? '', "\n")) {
576576
continue;
577577
}
578578
$escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell)));

0 commit comments

Comments
 (0)