Skip to content

Instantly share code, notes, and snippets.

View vpArth's full-sized avatar

Alexander Deider vpArth

  • https://github.com/skyeng
  • Russia, Novosibirsk
View GitHub Profile
@vpArth
vpArth / AjaxAuthenticationListener.php
Created November 30, 2016 19:14 — forked from xanf/AjaxAuthenticationListener.php
AJAX auth errors listener for Symfony2
<?php
namespace Application\ProdrepHelperBundle\Component\Event;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
/**
*/
class AjaxAuthenticationListener
@vpArth
vpArth / TicTacToe.php
Created August 24, 2018 09:34
TicTacToe implementation (variable map size, win condition, players set)
<?php
class TicTacToeGame
{
/** @var int */
private $width;
/** @var int */
private $height;
/** @var int */
private $winCond;