-
Notifications
You must be signed in to change notification settings - Fork 660
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
Non-static methods called statically should report error #8509
Labels
Comments
I found these snippets: https://psalm.dev/r/8d8e02aefb<?php
/**
* @param callable $callable
* @return void
*/
function do_action( $callable ) {
call_user_func( $callable );
}
class foo {
public function __construct() {
// should give error, since "hello" isn't static
do_action( array( __CLASS__, 'hello' ) );
do_action( array( foo::class, 'hello' ) );
do_action( array( 'foo', 'hello' ) );
do_action( 'foo::hello' );
}
/**
* @return string
*/
public function hello() {
return 'hello';
}
}
|
kkmuffme
added a commit
to kkmuffme/psalm
that referenced
this issue
Mar 19, 2024
…urrent context Fix vimeo#10823 Fix vimeo#8509
kkmuffme
added a commit
to kkmuffme/psalm
that referenced
this issue
Mar 19, 2024
…urrent context Fix vimeo#10823 Fix vimeo#8509
kkmuffme
added a commit
to kkmuffme/psalm
that referenced
this issue
Mar 19, 2024
…urrent context Fix vimeo#10823 Fix vimeo#8509
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://psalm.dev/r/8d8e02aefb
The text was updated successfully, but these errors were encountered: