Skip to content

Instantly share code, notes, and snippets.

<?php
declare(strict_types=1);
namespace Kafkiansky\Bot\Bus;
use Kafkiansky\Bot\Component\Event\EventDispatcher;
use Kafkiansky\Bot\Component\Event\FinishRequestEvent;
use Kafkiansky\Bot\Connection;
use Kafkiansky\Bot\Http\Request;
<?php
interface IpFinderInterface
{
public function supports(string $type): bool;
public function find(string $uip): ?string;
}
class IpInfoFinder implements IpFinderInterface
{
<?php
class TaskRepository
{
// __construct()
public function getById(Id $id): TaskView
{
$sql = '
SELECT
<?php
/**
* @Route("", name="", methods={"POST"})
* @Permissions(adminPermissions=true)
*
* @param Task $task
* @param Request $request
* @param Publish\Handler $handler
* @return JsonResponse
<?php
declare(strict_types=1);
...
use Symfony\Component\Validator\Constraints as Assert;
class Command
{
<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
/**