mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-25 17:21:19 +02:00
23 lines
339 B
PHP
23 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);
|
|
}
|
|
}
|