Created
February 12, 2016 23:24
-
-
Save nubeiro/ce91e76780136cd6a0f5 to your computer and use it in GitHub Desktop.
Testing type hints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AMQPReader{ | |
public function read_table() { | |
echo "do something"; | |
} | |
} | |
class BaseProtocol | |
{ | |
public static function connectionStartOk(AMQPReader $reader) | |
{ | |
$reader->read_table(); | |
} | |
} | |
class myProtocol extends BaseProtocol { | |
public static function connectionStartOk($reader) | |
{ | |
parent::connectionStartOk($reader); | |
} | |
} | |
$reader = new AMQPReader(); | |
myProtocol::connectionStartOk($reader); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment