Skip to content

Instantly share code, notes, and snippets.

View JavierCane's full-sized avatar
🤟
Working on @CodelyTV

Javier Ferrer González JavierCane

🤟
Working on @CodelyTV
View GitHub Profile
@JavierCane
JavierCane / SemanticFinderKataJavaStyle.scala
Created April 18, 2017 20:42
First step for the Finder Refactoring Kata. More info: http://codely.tv/screencasts/finder-kata-scala/
// Post: http://codely.tv/screencasts/finder-kata-scala/
// Repo: https://github.com/CodelyTV/incomprehensible-finder-refactoring-kata-scala
package tv.codely.finderKata.algorithm
import java.util
import java.util.ArrayList
import scala.collection.JavaConverters._
@JavierCane
JavierCane / FinderKataJavaStyle.scala
Created April 18, 2017 20:42
Initial code for the Finder Refactoring Kata. More info: http://codely.tv/screencasts/finder-kata-scala/
// Post: http://codely.tv/screencasts/finder-kata-scala/
// Repo: https://github.com/CodelyTV/incomprehensible-finder-refactoring-kata-scala
package tv.codely.finderKata.algorithm
import java.util
import java.util.ArrayList
import scala.collection.JavaConverters._
<?php
namespace CodelyTv\Context\Meetup\Module\Video\Test\PhpUnit;
use CodelyTv\Context\Meetup\Module\Video\Domain\Video;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoRepository;
use CodelyTv\Context\Meetup\Test\PhpUnit\MeetupContextUnitTestCase;
use Mockery\MockInterface;
use function CodelyTv\Test\similarTo;
<?php
namespace CodelyTv\Context\Meetup\Module\Video\Tests\Behaviour;
use CodelyTv\Context\Meetup\Module\Video\Domain\Create\CreateVideoCommandHandler;
use CodelyTv\Context\Meetup\Module\Video\Domain\Create\VideoCreator;
use CodelyTv\Context\Meetup\Module\Video\Test\PhpUnit\VideoModuleUnitTestCase;
use CodelyTv\Context\Meetup\Module\Video\Test\Stub\CreateVideoCommandStub;
use CodelyTv\Context\Meetup\Module\Video\Test\Stub\VideoCreatedDomainEventStub;
use CodelyTv\Context\Meetup\Module\Video\Test\Stub\VideoIdStub;
<?php
namespace CodelyTv\Context\Meetup\Module\Video\Domain\Create;
use CodelyTv\Context\Meetup\Module\Video\Domain\Video;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoId;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoRepository;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoTitle;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoUrl;
use CodelyTv\Infrastructure\Bus\Event\DomainEventPublisher;
<?php
namespace CodelyTv\Context\Meetup\Module\Video\Domain\Create;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoId;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoTitle;
use CodelyTv\Context\Meetup\Module\Video\Domain\VideoUrl;
use CodelyTv\Shared\Domain\CourseId;
final class CreateVideoCommandHandler
<?php
namespace CodelyTv\Api\Controller;
use CodelyTv\Context\Meetup\Module\Video\Domain\Create\CreateVideoCommand;
use CodelyTv\Infrastructure\Bus\Command\CommandBus;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
<?php
namespace AppBundle\Tests\Controller;
use AppBundle\Controller\CourseController;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Doctrine\ORM\AbstractQuery;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\QueryBuilder;
use PHPUnit_Framework_TestCase;
<?php
namespace AppBundle\Controller;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\Request;
final class CourseController extends FOSRestController
{
public function getCourseAction(Request $request)
{
return $this->getDoctrine()
->getEntityManager()
<?php
namespace AppBundle\Controller;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\Request;
final class CourseController extends FOSRestController
{
public function getCourseAction(Request $request)
{
return $this->getDoctrine()
->getEntityManager()