Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
export PATH="/usr/local/bin:$PATH"
php vendor/bin/phpunit --configuration phpunit.xml.dist --testsuite=unit
if [[ $? -ne 0 ]]; then
exit 1
fi
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
@jenschude
jenschude / json.php
Created June 7, 2019 09:04
JsonReader
<?php
require __DIR__ . '/../vendor/autoload.php';
use Doctrine\Common\Annotations\AnnotationRegistry;
use JMS\Serializer\Annotation as Serializer;
use JMS\Serializer\Annotation\Type;
use JMS\Serializer\SerializerBuilder;
use pcrov\JsonReader\JsonReader;
@jenschude
jenschude / delete-project.php
Last active June 18, 2019 06:28
useful CTP stuff
<?php
namespace App;
use Cache\Adapter\Filesystem\FilesystemCachePool;
use Commercetools\Core\Builder\Request\RequestBuilder;
use Commercetools\Core\Client;
use Commercetools\Core\Config;
use Commercetools\Core\Request\Products\Command\ProductUnpublishAction;
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
@jenschude
jenschude / Foo.java
Last active September 28, 2020 22:21
Foo.java
public class Foo
{
public boolean bar(int a, int b)
{
if (a == b) {
return false;
}
return true;
}
@jenschude
jenschude / affirmation
Created March 16, 2017 12:56
MuleSoft Contributor Agreement Acceptance by Jens Schulze
I, Jens Schulze, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Thu Mar 16 2017 13:56:04 GMT+0100 (CET)