Skip to content

Instantly share code, notes, and snippets.

@mvriel
mvriel / gist:1548455
Created January 1, 2012 21:57
Extract dependency namespaces from DocBlox structure file and attempt to generate composer.json requires
<?php
if ($argc < 2) {
throw new Exception('Must provide location of DocBlox structure.xml file as argument');
}
$structure_file = $argv[1];
$packages = array();
$packagist = json_decode(file_get_contents('http://packagist.org/packages.json'));
foreach($packagist as $package_obj) {
@mvriel
mvriel / gist:1387152
Created November 22, 2011 21:59
RFC: Adding support for external artifacts for Travis

In order to display the output of several source code analysis / build tools it is necessary to have the ability to store and display their output.

QA Tools can output in two different ways:

  • To STDOUT
  • To a physical disk as file(s)

The latter output type can be split into two sub-types:

  • Raw files, or logs
@mvriel
mvriel / pre-commit.php
Created May 16, 2011 20:14
Pre-commit hook for DocBlox
#!/usr/bin/php
<?php
echo PHP_EOL;
// output a little introduction
echo '>> Starting unit tests' . PHP_EOL;
// get the name for this project; probably the topmost folder name
$projectName = basename(getcwd());
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<link rel="stylesheet" href="theme.css" type="text/css" />
</head>
<body>