Skip to content

Commit

Permalink
updated ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Athlon1600 committed Nov 11, 2023
1 parent 89d0b80 commit bc77375
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
@@ -1,14 +1,14 @@
name: build

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2']
operating-system: [ ubuntu-latest ]
php-versions: [ '7.4', '8.0', '8.1', '8.2' ]
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
Expand All @@ -28,4 +28,7 @@ jobs:
- name: Static analysis
run: |
composer require --dev phpstan/phpstan
vendor/bin/phpstan analyse -l 4 src tests
vendor/bin/phpstan analyse -l 6 src tests
- name: Run PHPUnit
run: vendor/bin/phpunit --verbose --colors=always tests
12 changes: 6 additions & 6 deletions src/Models/VideoInfo.php
Expand Up @@ -8,7 +8,7 @@
class VideoInfo
{
// uniquely identifies this video
public ?string $id;
public ?string $id = null;

public ?string $channelId = null;
public ?string $channelTitle = null;
Expand All @@ -19,13 +19,13 @@ class VideoInfo

public ?string $category;

public ?int $viewCount;
public ?int $commentCount;
public ?int $likeCount;
public ?int $dislikeCount;
public ?int $viewCount = null;
public ?int $commentCount = null;
public ?int $likeCount = null;
public ?int $dislikeCount = null;

// in seconds
public ?int $durationSeconds;
public ?int $durationSeconds = null;

// tags?
public array $keywords = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Utils.php
Expand Up @@ -52,7 +52,7 @@ public static function extractChannel(string $url): ?string
* @param mixed $default
* @return mixed|null
*/
public static function arrayGet($array, string $key, $default = null)
public static function arrayGet(array $array, string $key, $default = null)
{
foreach (explode('.', $key) as $segment) {

Expand Down

0 comments on commit bc77375

Please sign in to comment.