Skip to content

Commit bacbbda

Browse files
authored
Merge pull request #119 from adhocore/analysis-MPm3GO
Apply fixes from StyleCI
2 parents f96cc05 + 70616bd commit bacbbda

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/Helper/InflectsString.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function toWords(string $string): string
5353
}
5454

5555
/**
56-
* Return width of string
56+
* Return width of string.
5757
*/
5858
public function strwidth(string $string): int
5959
{
@@ -65,7 +65,7 @@ public function strwidth(string $string): int
6565
}
6666

6767
/**
68-
* Get part of string
68+
* Get part of string.
6969
*/
7070
public function substr(string $string, int $start, ?int $length = null): string
7171
{

src/Output/Table.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected function parseStyle(array|callable $style, $val, array $row, array $ta
176176
}
177177

178178
/**
179-
* Pad a multibyte string to a certain length with another multibyte string
179+
* Pad a multibyte string to a certain length with another multibyte string.
180180
*/
181181
protected function strPad(string $string, int $length, string $pad_string = ' '): string
182182
{

tests/Output/TableTest.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -642,24 +642,24 @@ public function test_render_with_html_like_tags_in_cell_content(): void
642642

643643
public function test_render_with_unicode_characters_in_cell_content(): void
644644
{
645-
if (! extension_loaded('mbstring')) {
645+
if (!extension_loaded('mbstring')) {
646646
$this->markTestSkipped('The mbstring extension is not installed. This test will faill without it');
647647
}
648648

649649
$rows = [
650650
['name' => 'François', 'greeting' => 'Bonjour'],
651651
['name' => 'Jürgen', 'greeting' => 'Guten Tag'],
652-
['name' => '北京', 'greeting' => '你好']
652+
['name' => '北京', 'greeting' => '你好'],
653653
];
654654

655655
$expectedOutput =
656-
"+----------+-----------+" . PHP_EOL .
657-
"| Name | Greeting |" . PHP_EOL .
658-
"+----------+-----------+" . PHP_EOL .
659-
"| François | Bonjour |" . PHP_EOL .
660-
"| Jürgen | Guten Tag |" . PHP_EOL .
661-
"| 北京 | 你好 |" . PHP_EOL .
662-
"+----------+-----------+";
656+
'+----------+-----------+' . PHP_EOL .
657+
'| Name | Greeting |' . PHP_EOL .
658+
'+----------+-----------+' . PHP_EOL .
659+
'| François | Bonjour |' . PHP_EOL .
660+
'| Jürgen | Guten Tag |' . PHP_EOL .
661+
'| 北京 | 你好 |' . PHP_EOL .
662+
'+----------+-----------+';
663663

664664
$result = $this->table->render($rows);
665665

0 commit comments

Comments
 (0)