Created
February 11, 2024 20:19
-
-
Save Astro-Otter-Space/6a6e494e2e0457dfdfd9b3beda08e83f to your computer and use it in GitHub Desktop.
This file contains 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
final class Dog extends Animal | |
{ | |
private readonly string $noise = 'barks'; | |
protected fonction makeNoise(): string | |
{ | |
return $this->noise; | |
} | |
} | |
final class Cat extends Animal | |
{ | |
} | |
final class Bird extends Animal | |
{ | |
} | |
abstract class Animal | |
{ | |
abstract protected fonction makeNoise(): string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment