Skip to content

Instantly share code, notes, and snippets.

View jonathaningram's full-sized avatar

Jonathan Ingram jonathaningram

View GitHub Profile
<?php
class OptionA
{
/**
* @var \DateTime $date
*/
private $date;
// the $date in the docblock seems redundant?
}
<?php
$userData = str_replace(array("\r\n", "\r"), "\n", $userData);
#!/bin/bash
# Configure logrotate
touch /etc/logrotate.d/example.com
read -r -d '' LOGROTATE_EXAMPLE <<EOF
; Nothing to see here (yet)
EOF
{
"autoload": {
"psr-0": {
"": [
"src/",
"vendor/knplabs/knp-paginator-bundle/"
]
}
},
"repositories": [
{
"name": "myproject",
"description": "",
"autoload": {
"psr-0": { "": "src/" }
},
"repositories": [
{
"type": "composer",
"url": "http://packages.zendframework.com/"
<?php
use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
use Behat\Behat\Context\BehatContext;
use Behat\Behat\Context\Step;
use Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode;
default:
extensions:
Behat\Symfony2Extension\Extension: ~
Behat\MinkExtension\Extension:
base_url: 'http://localadmin.example.com'
selenium2: ~
sahi: ~
goutte: ~
default_session: goutte
javascript_session: sahi
{
"name": "jbi/project",
"description": "",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": "2.2.*",
Acme
Domain
Entity
CategoryInterface.php
ProductInterface.php
Factory
CategoryFactoryInterface.php
ProductFactoryInterface.php
Repository
CategoriesRepositoryInterface.php
Acme
Domain
Entity
Factory
Repository
Service