Skip to content

Instantly share code, notes, and snippets.

View yourwebmaker's full-sized avatar
🍊
Back to Reality!

Daniel Lima yourwebmaker

🍊
Back to Reality!
  • Netherlands
View GitHub Profile
@yourwebmaker
yourwebmaker / DefaultRepository.php
Last active January 15, 2016 00:31
How to mock a Doctrine Custom Repository using Profecy
<?php
declare(strict_types = 1);
namespace App;
use Doctrine\ORM\EntityRepository;
use App\Exception\EntityNotFoundException;
class DefaultRepository extends EntityRepository
{
@yourwebmaker
yourwebmaker / PageRepository.php
Last active June 10, 2016 05:03
Just sharing some pieces of code with others. Every file has your own comments described on the top of each one.
<?php
namespace GivenTree\Certification;
/**
* A simple example orepository pattern (http://martinfowler.com/eaaCatalog/repository.html)
* In this example I've used in-memory strategy to retrieve records
* Project: http://test.giventree.org/
* Framework: Laravel
*/
@yourwebmaker
yourwebmaker / Entidades.php
Last active January 27, 2017 11:31
Exemplo mostrando desacoplamento de camadas e de framework
<?php
namespace Domain\Entidades;
/**
* Representa uma música no sistema.
* Não importa de onde ela venha: Banco, Cache, WS, FileSystem
*/
class Musica
{