Skip to content

Commit af5fe74

Browse files
author
Frederic Dewinne
committed
add PHP CodeSniffer rules
1 parent 085f2ca commit af5fe74

File tree

5 files changed

+112
-0
lines changed

5 files changed

+112
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/vendor
2+
composer.lock
3+
composer.phar
4+
.DS_Store
5+
.idea
6+
Thumbs.db

composer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "continuousphp/phing-tasks",
3+
"homepage": "https://github.com/continuousphp/phing-tasks",
4+
"description": "Phing tasks for continuousphp",
5+
"type": "library",
6+
"keywords": ["build", "tool", "task", "phing", "continuousphp"],
7+
"license": "Apache-2.0",
8+
"authors": [
9+
{
10+
"name": "Frederic Dewinne",
11+
"email": "frederic@continuousphp.com"
12+
}
13+
],
14+
"require-dev": {
15+
"phpunit/phpunit": "^4.6",
16+
"squizlabs/php_codesniffer": "^2.3"
17+
},
18+
"require": {
19+
"phing/phing": "~2.9"
20+
},
21+
"autoload": {
22+
"psr-0": {
23+
"Continuous\\": "src/"
24+
}
25+
}
26+
}

phpcs.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="continuousphp-phing-tasks">
3+
<description>PSR2 Coding standard</description>
4+
<rule ref="PSR2"/>
5+
</ruleset>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* AbstractTask.php
4+
*
5+
* @author Frederic Dewinne <frederic@continuousphp.com>
6+
* @copyright Copyright (c) 2015 Continuous S.A. (http://continuousphp.com)
7+
* @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0
8+
* @file AbstractTask.php
9+
* @link http://github.com/continuousphp/phing-tasks the canonical source repo
10+
*/
11+
12+
namespace Continuous\Task;
13+
14+
/**
15+
* AbstractTask
16+
*
17+
* @package phing-tasks
18+
* @author Frederic Dewinne <frederic@continuousphp.com>
19+
* @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0
20+
*/
21+
abstract class AbstractTask extends \Task
22+
{
23+
/**
24+
* @var string
25+
*/
26+
static protected $token;
27+
28+
/**
29+
* @param string $token
30+
* @return $this
31+
*/
32+
public function setToken($token)
33+
{
34+
self::$token = $token;
35+
36+
return $this;
37+
}
38+
39+
/**
40+
* @return string
41+
*/
42+
protected function getToken()
43+
{
44+
return self::$token;
45+
}
46+
}

src/Continuous/Task/ConfigTask.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* ConfigTask.php
4+
*
5+
* @author Frederic Dewinne <frederic@continuousphp.com>
6+
* @copyright Copyright (c) 2015 Continuous S.A. (http://continuousphp.com)
7+
* @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0
8+
* @file ConfigTask.php
9+
* @link http://github.com/continuousphp/phing-tasks the canonical source repo
10+
*/
11+
12+
namespace Continuous\Task;
13+
14+
/**
15+
* ConfigTask
16+
*
17+
* @package phing-tasks
18+
* @author Frederic Dewinne <frederic@continuousphp.com>
19+
* @license http://opensource.org/licenses/Apache-2.0 Apache License, Version 2.0
20+
*/
21+
class ConfigTask extends AbstractTask
22+
{
23+
/**
24+
* Task entry point
25+
*/
26+
public function main()
27+
{
28+
}
29+
}

0 commit comments

Comments
 (0)