Skip to content

Instantly share code, notes, and snippets.

<?php
declare(strict_types=1);
class AddressDepartamentContentQuery implements ContentQuery
{
private $addressRepository;
private $departamentRepository;
public function __consturct(AddressRepository $addressRepository, DepartamentRepository $departamentRepository)
<?php
declare(strict_types=1);
class SellOnlineTicket implements Command
{
public function clientDetails(): ClientDetails
{}
public function clientEmail(): Email
<?php
declare(strict_types=1);
namespace Cocoders\core\Application\UseCase;
use Cocoders\Core\Domain\Users;
use Cocoders\Core\Application\TransactionManager;
use Cocoders\core\Application\UseCase\RegisterUser\UserFactory;
use Cocoders\core\Application\UseCase\RegisterUser\Command;
<?php
public function getContacts(): array
{
return array_map(function (Contact $contact) { return $contact->shortContact(); }, $this->contacts->toArray());
}
<?php
declare(strict_types=1);
namespace Cocoders\Application\View\Blog;
class AdminPost
{
private $id;
private $name;
@l3l0
l3l0 / Dockerfile
Created June 9, 2016 19:08
Example minimal Dockerfile to use with composer.
FROM php:7.0.7-cli
RUN apt-get update && apt-get install -y git zlib1g-dev
RUN docker-php-ext-install zip
<?php
$xmlString = <<<XML
<ul>
<li class="applicationDate">
<strong>Data aplikacji: </strong>
"
19/10/15
"
</li>
<?php
interface CreateProductResponder
{
public function productCreated(ProductId $productId);
}
$post->leaveAComment(
$this->getUser()->getEmail(),
$form->get('content')->getData()
);
$this->getDoctrine()->getManager()->flush();
<?php
namespace L3l0Labs\SystemAccess;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
class Account implements AdvancedUserInterface
{
private $id;