Fix linter warnings: add strict_types and replace isset with explicit checks#14
Merged
Fix linter warnings: add strict_types and replace isset with explicit checks#14
Conversation
…ecks Co-authored-by: egorsmkv <7875085+egorsmkv@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix warnings related to strict types and isset
Fix linter warnings: add strict_types and replace isset with explicit checks
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mago linter flagged missing
declare(strict_types=1);directives and ambiguousisset()usage that conflates existence checks with null checks.Changes
declare(strict_types=1);to all PHP files (test.php,packages/default/notifier/index.php,packages/default/notifier/test.php)isset()with explicitarray_key_exists()+ null comparison in argument validationBefore:
After:
This separates the two concerns: key existence and null value checking. PHP's short-circuit OR evaluation prevents accessing non-existent keys.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/carthage-software/mago/releases/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/qCe2zj /usr/bin/composer mago:install-binary(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/qemt2m /usr/bin/composer mago:install-binary 63afe740e99a13ba87ec199bb07bbdee937a5b62 /bin/sh it s.git/ efault/notifier/--hard /bin/sh -c git-upload-pack '/home/REDACTED/.cREDACTED d1652f673303492272778051 e/git-upload-pack get(http block)https://api.github.com/repos/carthage-software/mago/zipball/b50e6aa3e4e6abe144101720deddbf456cb7e0a1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/http-client/zipball/333b9bd7639cbdaecd25a3a48a9d2dcfaa86e019/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/mime/zipball/e0a0f859148daf1edf6c60b398eb40bfc96697d1/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/notifier/zipball/33e91495d9674b6ba5e2a1de810902ba976156f5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)https://api.github.com/repos/symfony/telegram-notifier/zipball/71f709c0a1543581e8e7c28ca80cb7c40ed84651/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/SnZKCc /usr/bin/composer install --no-interaction --prefer-dist(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.