Argument X for 'y' - expected 'z'

Sample code:

//...
class my_class {
    //...
}
//...
function do_something_with_z($x, my_class $arg) {
    //...
}
//...
do_something_with_z(12, 4); // Argument 2 for 'do_something_with_z' - expected 'my_class'
//...

You passed argument of wrong type to some function or method.