type hinting with int in Core.class.php #30

Closed
pocmo opened this Issue Mar 31, 2010 · 1 comment

2 participants

@pocmo

There's a type hint with int in setConsistency (Core.class.php:397) which will trigger an error on call

Core.class.php:397
static public function setConsistency(int $consistencyLevel)

Calling code (from example)
PandraCore::setConsistency(cassandra_ConsistencyLevel::ONE);

Error:
PHP Catchable fatal error: Argument 1 passed to setConsistency() must be an instance of int, integer given, called in

The PHP manual says:
Traditional type hinting with int and string isn't supported. (http://www.php.net/manual/en/language.oop5.typehinting.php)

Is this a bug or are you using any third party library for type hinting? (as there seems to exist an unit test for setConsistency (PandraCoreTest.php) :)

@mjpearson
Owner

thanks, have committed a fix ;)

.michael.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment