Skip to content

Commit

Permalink
Use short syntax for all arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
sprain committed Nov 6, 2020
1 parent aa3ca31 commit 40f9def
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PaymentPart/Output/TcPdfOutput/TcPdfOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ private function addFurtherInformationContent(): void
private function addSeparatorContentIfNotPrintable(): void
{
if (!$this->isPrintable()) {
$this->tcPdf->SetLineStyle(array('width' => 0.1, 'color' => array(0, 0, 0)));
$this->tcPdf->SetLineStyle(['width' => 0.1, 'color' => [0, 0, 0]]);
$this->printLine(2 + $this->offsetX, 193 + $this->offsetY, 208 + $this->offsetX, 193 + $this->offsetY);
$this->printLine(62 + $this->offsetX, 193 + $this->offsetY, 62 + $this->offsetX, 296 + $this->offsetY);
$this->tcPdf->SetFont(self::FONT, '', self::FONT_SIZE_FURTHER_INFORMATION);
Expand Down
2 changes: 1 addition & 1 deletion src/Reference/QrPaymentReferenceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function validateFullReference(ExecutionContextInterface $context): void

private function modulo10(string $number): int
{
$table = array(0, 9, 4, 6, 8, 2, 7, 1, 3, 5);
$table = [0, 9, 4, 6, 8, 2, 7, 1, 3, 5];
$next = 0;
for ($i = 0; $i < strlen($number); $i++) {
$next = $table[($next + intval(substr($number, $i, 1))) % 10];
Expand Down
2 changes: 1 addition & 1 deletion src/String/StringModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class StringModifier
{
public static function replaceLineBreaksWithString(?string $string): string
{
return str_replace(array("\r", "\n"), ' ', $string);
return str_replace(["\r", "\n"], ' ', $string);
}

public static function replaceMultipleSpacesWithOne(?string $string): string
Expand Down

0 comments on commit 40f9def

Please sign in to comment.