mjpearson / Pandra

Cassandra abstraction layer and keyspace scaffolder for PHP developers --- ABANDONED.
GNU Lesser General Public License v3.0
93 stars 11 forks source link

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

Closed pocmo closed 14 years ago

pocmo commented 14 years ago

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 commented 14 years ago

thanks, have committed a fix ;)

.michael.