symplely/coroutine

View on GitHub
Coroutine/AbstractValue.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace Async;

abstract class AbstractValue
{
  protected $value;

  public function __construct($value)
  {
    $this->value = $value;
  }

  public function getValue()
  {
    $value = $this->value;
    $this->value = null;
    return $value;
  }
}