Skip to content

Instantly share code, notes, and snippets.

@AJenbo
AJenbo / DownloadAvatarsForGource.php
Last active October 14, 2021 14:34 — forked from openp2pdesign/GourceGravatarExample.py
Download git contributor avatars from GitHub and Gravatar for use with Gource
<?php
// Place in any subfolder of your project, run `php DownloadAvatarsForGource.php`
$list = shell_exec('git shortlog -sne');
if (!$list) {
return;
}
$lines = explode("\n", $list);
@AJenbo
AJenbo / PHPBuilderDynamicReturnTypeExtension.php
Created August 19, 2019 23:43
pdepend PHPStan intergration
<?php declare(strict_types = 1);
namespace PDepend\PHPStan\Type;
use PDepend\Source\Language\PHP\PHPBuilder;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantStringType;