Skip to content

Commit 5a186c3

Browse files
committed
Cosmetic
1 parent 6eb0c38 commit 5a186c3

5 files changed

Lines changed: 19 additions & 11 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,34 @@ jobs:
99
runs-on: ubuntu-24.04
1010
strategy:
1111
matrix:
12-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
12+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1313
name: PHP ${{ matrix.php }}
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 5
18-
# see https://github.com/shivammathur/setup-php
1918
- uses: shivammathur/setup-php@v2
2019
with:
2120
php-version: ${{ matrix.php }}
21+
tools: composer:2
2222
coverage: none
2323
- run: composer install --no-progress
24+
- run: composer php-cs-fixer-dry-run
2425
- run: composer phpstan
2526
- run: composer phpunit
2627

2728
tests_lowest_dependencies:
2829
runs-on: ubuntu-24.04
2930
steps:
30-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v6
3132
with:
3233
fetch-depth: 5
33-
# see https://github.com/shivammathur/setup-php
3434
- uses: shivammathur/setup-php@v2
3535
with:
3636
php-version: '7.1'
37+
tools: composer:2
3738
coverage: none
3839
- run: composer update --no-progress --prefer-lowest
40+
- run: composer php-cs-fixer-dry-run
3941
- run: composer phpstan
4042
- run: composer phpunit

lib/MC/Google/Visualization.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* field?: string,
2929
* fields?: string[],
3030
* callback?: callable,
31-
* extra?: mixed[],
31+
* extra?: array,
3232
* sort_field?: string,
3333
* join?: string
3434
* }
@@ -488,7 +488,7 @@ public function setDefaultEntity(?string $default = null): void
488488
* @param array $row the row values as an array
489489
* @param array $meta the metadata for the query (use generateMetadata())
490490
*
491-
* @return string the string fragment to include in the results back to the javascript client
491+
* @return string the string fragment to include in the results back to the JavaScript client
492492
*
493493
* @throws Visualization_Error
494494
*/
@@ -1007,7 +1007,6 @@ protected function generateSQL(array &$meta): string
10071007
$stmt = $this->db->query($pivotSql);
10081008
assert(false !== $stmt);
10091009
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
1010-
assert(false !== $rows);
10111010
foreach ($rows as $row) {
10121011
// Create a version of all function-ed fields for each unique combination of pivot values
10131012
foreach ($funcFields as $field) {

lib/MC/Parser/Def.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public function parsePart(string $str, int $loc): array
4646
{
4747
[$loc, $tok] = $this->_parse($str, $loc);
4848

49-
for (; ($loc < strlen($str)) && Parser::isWhitespace($str[$loc]); ++$loc);
49+
while (($loc < strlen($str)) && Parser::isWhitespace($str[$loc])) {
50+
++$loc;
51+
}
5052

5153
return [$loc, $tok];
5254
}

lib/MC/Parser/Def/Set.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace MC\Parser\Def;
66

77
use MC\Parser\Def;
8+
use MC\Parser\ParseError;
89

910
/**
1011
* Verify that the string matches a series of subexpressions in the specified order.
@@ -25,6 +26,8 @@ public function __construct(array $exprs = [])
2526
/**
2627
* @param string $str the string to parse
2728
* @param int $loc the index to start parsing
29+
*
30+
* @throws ParseError
2831
*/
2932
public function _parse(string $str, int $loc): array
3033
{

phpstan.neon

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ includes:
33
- vendor/phpstan/phpstan-phpunit/rules.neon
44
- vendor/phpstan/phpstan-strict-rules/rules.neon
55
parameters:
6-
checkMissingIterableValueType: false
76
reportUnmatchedIgnoredErrors: true
8-
treatPhpDocTypesAsCertain: false
7+
treatPhpDocTypesAsCertain: false
8+
ignoreErrors:
9+
-
10+
identifier: missingType.iterableValue

0 commit comments

Comments
 (0)