Skip to editor
Psalm
Docs
Playground
Plugins
Blog
Paid support
Share
Fix issues
Show original
PHP
Settings
<?php /** * @template A */ interface Semigroup { /** * @param Semigroup<A> $that * @return Semigroup<A> */ public function append(Semigroup $that): Semigroup; } class FooBrand {} /** * @implements Semigroup<FooBrand> */ class Foo implements Semigroup { /** * @param Semigroup<FooBrand> $that */ public function append(Semigroup $that): Foo { return $this; } } class BarBrand {} /** * @implements Semigroup<BarBrand> */ class Bar extends Foo implements Semigroup { /** * @param Semigroup<BarBrand> $that */ public function append(Semigroup $that): Bar { return $this; } }
Issues
Types
idle
Saved Aug 21 2020 09:17 UTC
⌘/Ctrl+Enter
run
⌘/Ctrl+S
share
F8
/
⇧F8
next/prev issue