Skip to content

Instantly share code, notes, and snippets.

View PurpleBooth's full-sized avatar

Billie Thompson PurpleBooth

View GitHub Profile
composer() {
mv ~/.homebrew/etc/php/7.0/conf.d/ext-xdebug.ini ~/.homebrew/etc/php/7.0/conf.d/ext-xdebug.ini-backup
command composer $@
STATUS=$?
mv ~/.homebrew/etc/php/7.0/conf.d/ext-xdebug.ini-backup ~/.homebrew/etc/php/7.0/conf.d/ext-xdebug.ini
return $STATUS
}
alias composer=composer
cache:
directories:
- $HOME/.composer/cache/
package main
import (
"net/http"
"fmt"
"encoding/json"
)
type Message struct {
Name string
@PurpleBooth
PurpleBooth / composer.phar
Last active February 13, 2017 23:14
I am on a system with docker but without PHP
#!/bin/bash
set -euo pipefail
if [ ! -d "$HOME/.composer" ]; then
mkdir "$HOME/.composer"
touch "$HOME/.composer/.lastpull"
fi
if test find "$HOME/.composer/" -name ".lastpull" -and -mtime +7 > /dev/null 2>&1 ; then
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(array(
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => array('syntax' => 'short'),
'dir_constant' => true,
'heredoc_to_nowdoc' => true,
#!/bin/bash
cd /to/a/directory
# make comments
run -what --you=would type.on -the commandline
VARIABLES_ARE_A_THING="youcanuse"
# sometimes you want conditionals
resources:
- name: rollerderbyrss-version
type: semver
source:
driver: git
uri: git@github.com:PurpleBooth/versions.git
branch: rollerderbyrss
private_key: ((github_private_key))
initial_version: 0.3.0
<?php
class MyExampleService()
{
private $entityManager;
public function __construct(EntityManager $entityManager, OtherDependencies $dependencyOne)
{
$this->entityManager = $entityManager;
}
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(
[
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
From e14992c251e1dbd1173a72c42c5ee95dc1c3711f Mon Sep 17 00:00:00 2001
From: Billie Thompson <billie@purplebooth.co.uk>
Date: Tue, 29 Aug 2017 23:22:11 +0100
Subject: [PATCH] Failing test for issue #472
---
tests/PHPStan/Analyser/NodeScopeResolverTest.php | 4 ++++
tests/PHPStan/Analyser/data/functionPhpDocs.php | 2 ++
2 files changed, 6 insertions(+)