Skip to content

Instantly share code, notes, and snippets.

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