-
Notifications
You must be signed in to change notification settings - Fork 12
4379 Feat: Add Code Analyzer #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
stnguyen90
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I ran phpstan, I got 11 errors. Please make sure they're addressed:
$ docker run --rm -v $PWD:/app composer sh -c "composer install --profile --ignore-platform-reqs && ./vendor/bin/phpstan analyse --level max src tests"
[12.8MiB/0.27s] Installing dependencies from lock file (including require-dev)
[12.9MiB/0.27s] Verifying lock file contents can be installed on current platform.
[14.2MiB/0.28s] Nothing to install, update or remove
[14.0MiB/0.29s] Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
[14.0MiB/0.29s] Generating autoload files
[14.4MiB/0.44s] 43 packages you are using are looking for funding.
[14.4MiB/0.44s] Use the `composer fund` command to find out more!
[14.4MiB/0.44s] Memory usage: 14.42MiB (peak: 15.89MiB), time: 0.44s
7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ -----------------------------------------------------------------------
Line src/WebSocket/Adapter/Workerman.php
------ -----------------------------------------------------------------------
32 Parameter #1 $callback of function call_user_func expects callable():
mixed, mixed given.
69 Cannot access property $onWebSocketConnect on mixed.
------ -----------------------------------------------------------------------
------ -----------------------------------------------------------------------
Line src/WebSocket/Server.php
------ -----------------------------------------------------------------------
17 Property Utopia\WebSocket\Server::$errorCallbacks type has no value
type specified in iterable type array.
💡 See:
https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-i
terable-type
------ -----------------------------------------------------------------------
------ ---------------------------------------------------------------------
Line tests/servers/Swoole/server.php
------ ---------------------------------------------------------------------
28 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array<int, int> given.
31 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array<int, int> given.
34 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array given.
37 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array<int, int> given.
------ ---------------------------------------------------------------------
------ ---------------------------------------------------------------------
Line tests/servers/Workerman/server.php
------ ---------------------------------------------------------------------
27 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array<int, int> given.
30 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array<int, int> given.
33 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array given.
36 Parameter #1 $connections of method Utopia\WebSocket\Server::send()
expects array<string>, array<int, int> given.
------ ---------------------------------------------------------------------
[ERROR] Found 11 errors |
@stnguyen90 Teehee Please look at this again. |
|
Resolved all the errors. Thank you @stnguyen90 for helping to resolve the last error. |
|
Thank you so much for the PR 🤩. We're adding the |
stnguyen90
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey 👋 awesome work on your PR! We've approved your work and it'll be merged soon!
I know there's a build error, but it looks like that was already on the repo. We'll try to fix it in another PR.
|
THANK YOU! All changes merged 🥳 Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord. You can accept the invite by visiting https://github.com/orgs/appwrite/invitation. By joining our team, you will officially be an Appwrite maintainer on GitHub. You can change your membership visibility settings, so your new Appwrite team membership badge will show up on your personal GitHub profile. Please feel free to look for more PRs you might be interested in helping with on our long list of Hacktoberfest friendly issues and help make Appwrite better :) |


What does this PR do?
Implements code analyzer.
Link your issue: #4379
Have you read the Contributing Guidelines on issues?
Yes! 👏