Skip to content

Instantly share code, notes, and snippets.

@AlexanderC
Created March 14, 2014 18:44
Show Gist options
  • Save AlexanderC/9554119 to your computer and use it in GitHub Desktop.
Save AlexanderC/9554119 to your computer and use it in GitHub Desktop.
<?php
/**
* @author AlexanderC <self@alexanderc.me>
*/
namespace Life;
class Mood extends Life
{
public function __construct(Mood $previous)
{
if($previous->getStatus() === Life::STATUS_SAD) {
$previous->setStatus(Life::STATUS_HAPPY | Life::STATUS_AWESOME);
}
$this->setStatus(Life::STATUS_HAPPY | Life::STATUS_AWESOME);
$this->lockStatus(Life::LOCK_EXCLUSIVE | Life::LOCK_PERMANENT);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment