Skip to content

Instantly share code, notes, and snippets.

@rgomezcasas
Created September 18, 2017 18:08
Show Gist options
  • Save rgomezcasas/f2c10174a194c4a233b4bee3f06a1ccf to your computer and use it in GitHub Desktop.
Save rgomezcasas/f2c10174a194c4a233b4bee3f06a1ccf to your computer and use it in GitHub Desktop.
Command Example
<?php
final class RenameUserCommand extends Command
{
private $userId;
private $newName;
public function __construct(string $userId, string $newName)
{
$this->userId = $userId;
$this->newName = $newName;
}
public function userId(): string
{
return $this->userId;
}
public function newName(): string
{
return $this->newName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment