Created
January 30, 2016 19:58
-
-
Save cawa87/7388c5c5207e67e2ab09 to your computer and use it in GitHub Desktop.
PHP7
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
<?php | |
namespace App\MusicPlayer; | |
/** | |
* A music player! | |
*/ | |
class Player { | |
/** | |
* Some id | |
* | |
* @var int | |
*/ | |
public $id; | |
/** | |
* Repeat the song x times | |
*/ | |
function repeat(int $times): bool | |
{ | |
} | |
/** | |
* Adds a new song to the playlist | |
* | |
* @throws DrmException | |
* @return void | |
*/ | |
function addSong(Song $song) | |
{ | |
} | |
/** | |
* Returns all songs | |
*/ | |
function getSongs(): array | |
{ | |
return []; | |
} | |
/** | |
* Returns a singleton instance | |
*/ | |
static function getInstance(): self | |
{ | |
} | |
/** | |
* Secret key | |
* | |
* @var string | |
*/ | |
private $key; | |
/** | |
* Secret stuff! | |
*/ | |
private function secret() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment