Skip to content

Instantly share code, notes, and snippets.

@IgorDePaula
Created May 12, 2017 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IgorDePaula/e0d20c4528318dbbebb75661d9d0f4b5 to your computer and use it in GitHub Desktop.
Save IgorDePaula/e0d20c4528318dbbebb75661d9d0f4b5 to your computer and use it in GitHub Desktop.
<?php
interface Data{
}
interface Key extends Data{
}
interface Value extends Data{
}
abstract class Teste{
public function meToo(Data $data)
{
}
}
class MeToo extends Teste{
public function meToo(Key $data)
{
}
}
class KeyClass implements Key {
}
$mt = new MeToo();
$mt->meToo(new KeyClass());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment