Skip to content

Instantly share code, notes, and snippets.

View kolomiec-valeriy's full-sized avatar

Valeriy kolomiec-valeriy

View GitHub Profile
<?php
namespace App\Controller;
use App\Entity\ApiUser;
use App\Entity\CheckUp\CheckUp;
use App\Entity\CheckUp\Question;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use App\Subscription\IosSubscriptionManager;
use App\Entity\Subscription\IAPIosReceipt;
use Psr\Log\LoggerInterface;
<?php
namespace Mcfedr\AwsPushBundle\Message;
use Mcfedr\AwsPushBundle\Exception\MessageTooLongException;
class Message implements \JsonSerializable
{
/**
* @deprecated use NO_COLLAPSE
<?php
namespace App\Controller;
use App\Entity\ApiUser;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
@kolomiec-valeriy
kolomiec-valeriy / ImportVersesToEmotionsController.php
Created August 30, 2019 09:14
Assigning verses to emotions from csv files
<?php
namespace App\Controller;
use App\Entity\HeartTracker\Emotion;
use App\Entity\Position;
use App\Entity\Verse;
use Symfony\Component\Filesystem\Exception\FileNotFoundException;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;
<?php
namespace App\Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
class JsonHttpException extends HttpException
{
private $data;
<?php
namespace App\EventListener;
use App\Exception\JsonHttpException;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
App\EventListener\ExceptionListener:
arguments:
- '@logger'
tags:
- { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
app.json_exception_listener:
alias: App\EventListener\ExceptionListener
public: true
App\EventListener\ExceptionListener:
arguments:
- '@logger'
tags:
- { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
<?php
namespace App\Entity;
use App\Entity\HeartTracker\HeartTracker;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
use Symfony\Component\Validator\Constraints as Assert;
/**