Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,18 @@ jobs:
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest --ignore-platform-req=php

- name: Execute tests
run: vendor/bin/phpunit
run: composer test

- name: Check .php files for syntax errors
run: composer php:syntax -- --checkstyle | cs2pr

- uses: actions/cache@v3
id: cache-db
with:
path: ~/.symfony/cache
key: db

- name: Check composer dependencies for known security issues
uses: symfonycorp/security-checker-action@v3
with:
lock: ./composer.lock
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"league/event": "^2.1"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpunit/phpunit": "^9.5"
},
"autoload": {
Expand All @@ -38,6 +39,7 @@
"illuminate/container": "Hold dependencies to be injected in commands constructors"
},
"scripts": {
"php:syntax": "parallel-lint . --blame --colors --exclude vendor",
"test": "phpunit"
},
"extra": {
Expand Down
5 changes: 3 additions & 2 deletions src/Objects/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
*/
class Update extends BaseObject
{
protected ?string $updateType = null;
/** @var string|null Cached type of thr Update () */
protected $updateType = null;

/**
* {@inheritdoc}
Expand Down Expand Up @@ -91,7 +92,7 @@ public function isType($type)
*/
public function objectType(): ?string
{
return $this->updateType ??= $this->except('update_id')
return $this->updateType ?: $this->except('update_id')
->keys()
->first();
}
Expand Down