mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-22 15:51:13 +02:00
22 lines
339 B
PHP
22 lines
339 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Creational\Pool;
|
|
|
|
class StringReverseWorker
|
|
{
|
|
/**
|
|
* @var \DateTime
|
|
*/
|
|
private $createdAt;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->createdAt = new \DateTime();
|
|
}
|
|
|
|
public function run(string $text)
|
|
{
|
|
return strrev($text);
|
|
}
|
|
}
|