Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51b9477

Browse filesBrowse files
authored
PHPStan: Fix/phpstan styling (#236)
* [WIP] one * [WIP] two * [WIP] three * [UPD] php-cs-fixer * [UPD] composer rector * [UPD] rollback Composer php min version * [UPD] Rector auto ReadOnlyClassRector * [UPD] cs-fixer spacing roles, removed class alignment * [UPD] CI removed 8.1 tests
1 parent 4eb3938 commit 51b9477
Copy full SHA for 51b9477

73 files changed

+254-430Lines changed: 254 additions & 430 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/ci.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
strategy:
2020
matrix:
2121
php-version:
22-
- '8.1'
2322
- '8.2'
2423
- '8.3'
2524

Collapse file

‎.php-cs-fixer.dist.php‎

Copy file name to clipboardExpand all lines: .php-cs-fixer.dist.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
'no_whitespace_in_blank_line' => true,
4747
'blank_line_before_statement' => true,
4848
'no_extra_blank_lines' => true,
49-
'binary_operator_spaces' => true,
49+
'no_whitespace_before_comma_in_array' => true,
50+
'binary_operator_spaces' => [
51+
'default' => 'single_space'
52+
],
5053
])
5154
->setFinder($finder);
Collapse file

‎example/demo/src/App.php‎

Copy file name to clipboardExpand all lines: example/demo/src/App.php
+10-11Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,15 @@ private function activePage(): Component
232232
private function header(): Widget
233233
{
234234
return BlockWidget::default()
235-
->borders(Borders::ALL)->style(Style::default()->white())
236-
->widget(
237-
TabsWidget::fromTitles(
238-
Line::parse('<fg=red>[q]</>uit'),
239-
...array_reduce(ActivePage::cases(), function (array $lines, ActivePage $page) {
240-
$lines[] = Line::fromString(sprintf('%s', $page->navItem()->label));
241-
242-
return $lines;
243-
}, []),
244-
)->select($this->activePage->index() + 1)->highlightStyle(Style::default()->white()->onBlue())
245-
);
235+
->borders(Borders::ALL)->style(Style::default()->white())
236+
->widget(
237+
TabsWidget::fromTitles(
238+
Line::parse('<fg=red>[q]</>uit'),
239+
...array_map(
240+
fn (ActivePage $page) => Line::fromString($page->navItem()->label),
241+
ActivePage::cases()
242+
),
243+
)->select($this->activePage->index() + 1)->highlightStyle(Style::default()->white()->onBlue())
244+
);
246245
}
247246
}
Collapse file

‎example/demo/src/Page/ChartPage.php‎

Copy file name to clipboardExpand all lines: example/demo/src/Page/ChartPage.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function handle(Event $event): void
115115
}
116116

117117
/**
118-
* @return array<int,array{float,float}>
118+
* @return list<array{float,float}>
119119
*/
120120
private function sinData(int $offset): array
121121
{
Collapse file

‎lib/bdf/src/BdfBoundingBox.php‎

Copy file name to clipboardExpand all lines: lib/bdf/src/BdfBoundingBox.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
namespace PhpTui\BDF;
66

7-
final class BdfBoundingBox
7+
final readonly class BdfBoundingBox
88
{
99
public function __construct(
10-
public readonly BdfSize $size,
11-
public readonly BdfCoord $offset
10+
public BdfSize $size,
11+
public BdfCoord $offset
1212
) {
1313
}
1414

Collapse file

‎lib/bdf/src/BdfCoord.php‎

Copy file name to clipboardExpand all lines: lib/bdf/src/BdfCoord.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
namespace PhpTui\BDF;
66

7-
final class BdfCoord
7+
final readonly class BdfCoord
88
{
99
public function __construct(
10-
public readonly int $x,
11-
public readonly int $y
10+
public int $x,
11+
public int $y
1212
) {
1313
}
1414
}
Collapse file

‎lib/bdf/src/BdfFont.php‎

Copy file name to clipboardExpand all lines: lib/bdf/src/BdfFont.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
use RuntimeException;
88

9-
final class BdfFont
9+
final readonly class BdfFont
1010
{
1111
/**
12-
* @param list<BdfGlyph> $glyphs
12+
* @param array<BdfGlyph> $glyphs
1313
*/
1414
public function __construct(
15-
public readonly BdfMetadata $metadata,
16-
public readonly BdfProperties $properties,
17-
private readonly array $glyphs,
15+
public BdfMetadata $metadata,
16+
public BdfProperties $properties,
17+
private array $glyphs,
1818
) {
1919
}
2020

@@ -28,7 +28,7 @@ public function codePoint(int $codePoint): BdfGlyph
2828
}
2929

3030
/**
31-
* @return list<BdfGlyph>
31+
* @return array<BdfGlyph>
3232
*/
3333
public function glyphs(): array
3434
{
Collapse file

‎lib/bdf/src/BdfGlyph.php‎

Copy file name to clipboardExpand all lines: lib/bdf/src/BdfGlyph.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
namespace PhpTui\BDF;
66

7-
final class BdfGlyph
7+
final readonly class BdfGlyph
88
{
99
/**
1010
* @param array<int,int> $bitmap
1111
*/
1212
public function __construct(
13-
public readonly array $bitmap,
14-
public readonly BdfBoundingBox $boundingBox,
15-
public readonly ?int $encoding,
16-
public readonly string $name,
17-
public readonly BdfCoord $deviceWidth,
18-
public readonly ?BdfCoord $scalableWidth
13+
public array $bitmap,
14+
public BdfBoundingBox $boundingBox,
15+
public ?int $encoding,
16+
public string $name,
17+
public BdfCoord $deviceWidth,
18+
public ?BdfCoord $scalableWidth
1919
) {
2020
}
2121
}
Collapse file

‎lib/bdf/src/BdfMetadata.php‎

Copy file name to clipboardExpand all lines: lib/bdf/src/BdfMetadata.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
namespace PhpTui\BDF;
66

7-
final class BdfMetadata
7+
final readonly class BdfMetadata
88
{
99
public function __construct(
10-
public readonly ?float $version,
11-
public readonly ?string $name,
12-
public readonly ?int $pixelSize,
13-
public readonly ?BdfSize $resolution,
14-
public readonly ?BdfBoundingBox $boundingBox
10+
public ?float $version,
11+
public ?string $name,
12+
public ?int $pixelSize,
13+
public ?BdfSize $resolution,
14+
public ?BdfBoundingBox $boundingBox
1515
) {
1616
}
1717
}
Collapse file

‎lib/bdf/src/BdfParser.php‎

Copy file name to clipboardExpand all lines: lib/bdf/src/BdfParser.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ private function parseValue(BdfTokenStream $tokens): int|string|null
140140
}
141141

142142
/**
143-
* @return array<int,BdfGlyph>
143+
* @return array<BdfGlyph>
144144
*/
145145
private function parseGlyphs(BdfTokenStream $tokens): array
146146
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.