Skip to content

Instantly share code, notes, and snippets.

View wouterj's full-sized avatar

Wouter de Jong wouterj

View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<!-- ... -->
</head>
<body class="page">
<!-- ... -->
{% block hero_unit_wrapper -%}
<section class="page__sub-header article--featured grid grid--center">
<?php
namespace Wj\Stoffer;
use Wj\Stoffer\Event\LineEvent;
use Wj\Stoffer\Scissors\ScissorsInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* @author Wouter J <wouter@wouterj.nl>
<?php
namespace spec\Wj\Stoffer;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Wj\Stoffer\Scissors\ScissorsInterface;
class KernelSpec extends ObjectBehavior
{
<?php
namespace Wj\Stoffer\Scissors;
class Line
{
private $input;
public function __construct($input)
{
<?php
$root
->fixXmlConfig('path')
->children()
->arrayNode('paths')
->beforeNormalization()
->ifString()
->then(function ($v) {
return array($v);
<?php
// inside tests
$event = \Mockery::mock('Wj\ShiftSymfonyBundle\Event\RequestEvent');
$event->shouldReceive('getRequest')
->atLeast()->once();
// the class
class RequestEvent
{
@wouterj
wouterj / README.md
Last active December 31, 2015 07:49 — forked from weaverryan/README.md

It's a Doc Hack Day!

Welcome! No matter what you're level of Symfony or how you feel about your English (I'm sure it's just fine), we have plenty of things we need help with! This document will guide you through everything:

Where are we meeting?

We're meeting on Freenode in the #symfony-docs channel. Come hang out!

What can I work on?

@wouterj
wouterj / f.php
Last active December 31, 2015 04:49
<?php
/**
* Implementation of FooInterface.
*/
class FooClass implements FooInterface
{
/**
* @var array
*/
<?php
// ...
class MyAwesomeController extends Controller
{
public function uselessAction(Request $request)
{
$user = new User();
<?php
namespace Wj\ForumBundle\Document;
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @PHPCR\Document(referenceable=true)
*/