Add file-level docblock to every file.

This commit is contained in:
Dan Cryer 2013-05-16 02:16:56 +01:00
parent 7ad996ce7c
commit 6094b7013c
36 changed files with 272 additions and 38 deletions

View file

@ -1,9 +1,20 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI;
use b8,
b8\Registry;
/**
* PHPCI Front Controller
* @author Dan Cryer <dan@block8.co.uk>
*/
class Application extends b8\Application
{
public function handleRequest()

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI;
use PHPCI\Model\Build,
@ -6,6 +13,10 @@ use PHPCI\Model\Build,
PHPCI\Model\Build\GithubBuild,
PHPCI\Model\Build\BitbucketBuild;
/**
* PHPCI Build Factory - Takes in a generic "Build" and returns a type-specific build model.
* @author Dan Cryer <dan@block8.co.uk>
*/
class BuildFactory
{
public static function getBuild(Build $base)

View file

@ -1,10 +1,21 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI;
use PHPCI\Model\Build;
use b8\Store;
use Symfony\Component\Yaml\Parser as YamlParser;
/**
* PHPCI Build Runner
* @author Dan Cryer <dan@block8.co.uk>
*/
class Builder
{
public $buildPath;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Command;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Command;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Command;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8,

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8,

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8,

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8,

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Controller;
use b8,

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Helper;

View file

@ -1,8 +1,11 @@
<?php
/**
* Build model for table: build
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model;

View file

@ -1,15 +1,18 @@
<?php
/**
* Build model for table: build
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model\Build;
use PHPCI\Model\Build;
use PHPCI\Model\Build\RemoteGitBuild;
/**
* Build Model
* BitBucket Build Model
* @uses PHPCI\Model\Build
*/
class BitbucketBuild extends RemoteGitBuild

View file

@ -1,14 +1,17 @@
<?php
/**
* Build model for table: build
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model\Build;
use PHPCI\Model\Build\RemoteGitBuild;
/**
* Build Model
* Github Build Model
* @uses PHPCI\Model\Build
*/
class GithubBuild extends RemoteGitBuild
@ -58,7 +61,10 @@ class GithubBuild extends RemoteGitBuild
$params = array( 'state' => $status,
'target_url' => \b8\Registry::getInstance()->get('install_url') . '/build/view/' . $this->getId());
$http->setHeaders(array('Authorization: token ' . $project->getToken()));
$http->setHeaders(array(
'Authorization: token ' . $project->getToken(),
'Content-Type: application/x-www-form-urlencoded'
));
$http->request('POST', $url, json_encode($params));
}

View file

@ -1,8 +1,11 @@
<?php
/**
* Build model for table: build
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model\Build;
use PHPCI\Model\Build;
@ -10,7 +13,7 @@ use Symfony\Component\Yaml\Parser as YamlParser;
use PHPCI\Builder;
/**
* Build Model
* Local Build Model
* @uses PHPCI\Model\Build
*/
class LocalBuild extends Build

View file

@ -1,8 +1,11 @@
<?php
/**
* Build model for table: build
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model\Build;
use PHPCI\Model\Build;
@ -10,7 +13,7 @@ use PHPCI\Builder;
use Symfony\Component\Yaml\Parser as YamlParser;
/**
* Build Model
* Remote Build Model
* @uses PHPCI\Model\Build
*/
abstract class RemoteGitBuild extends Build

View file

@ -1,8 +1,11 @@
<?php
/**
* Project model for table: project
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model;

View file

@ -1,8 +1,11 @@
<?php
/**
* User model for table: user
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Model;

View file

@ -1,7 +1,18 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI;
/**
* PHPCI Plugin Interface - Used by all build plugins.
* @author Dan Cryer <dan@block8.co.uk>
*/
interface Plugin
{
public function __construct(\PHPCI\Builder $phpci, array $options = array());

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;
use PDO;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;
use PDO;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin;

View file

@ -1,8 +1,11 @@
<?php
/**
* Build store for table: build
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Store;

View file

@ -1,8 +1,11 @@
<?php
/**
* Project store for table: project
*/
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Store;

View file

@ -1,13 +1,22 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
namespace PHPCI\Plugin\Tests;
use PHPCI\Plugin\PHPUnit;
define('PHPCI_BIN_DIR', "FAKEPHPCIBIN");
class PHPUnitTest
extends \PHPUnit_Framework_TestCase
/**
* Unit test for the PHPUnit plugin.
* @author meadsteve
*/
class PHPUnitTest extends \PHPUnit_Framework_TestCase
{
/**

View file

@ -1,4 +1,11 @@
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
// Let PHP take a guess as to the default timezone, if the user hasn't set one:
date_default_timezone_set(@date_default_timezone_get());

View file

@ -1,5 +1,12 @@
#!/usr/bin/env php
<?php
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
define('PHPCI_BIN_DIR', dirname(__FILE__) . '/vendor/bin/');
define('PHPCI_DIR', dirname(__FILE__) . '/');

View file

@ -1,7 +1,11 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 'on');
/**
* PHPCI - Continuous Integration for PHP
*
* @copyright Copyright 2013, Block 8 Limited.
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
* @link http://www.phptesting.org/
*/
session_start();