Skip to content

Commit 020f77e

Browse files
FlyingmanaDavid Verholen
authored andcommitted
add phpcs as dev dependency to experiment with it
1 parent 4885034 commit 020f77e

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

CodeSniffer.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
$phpCodeSnifferConfig = array (
3+
'default_standard' => 'FireGento',
4+
'report_format' => 'summary',
5+
'show_warnings' => '0',
6+
'show_progress' => '1',
7+
'report_width' => '120',
8+
'installed_paths' => __DIR__.'/vendor/firegento/',
9+
);
10+

composer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"type":"composer-plugin",
77
"license":"OSL-3.0",
88
"homepage":"https://github.com/magento-hackathon/magento-composer-installer",
9+
"repositories": [
10+
{
11+
"type": "vcs",
12+
"url": "[email protected]:Flyingmana/phpcs.git"
13+
}
14+
],
915
"authors":[
1016
{
1117
"name":"Daniel Fahlke aka Flyingmana",
@@ -39,6 +45,8 @@
3945
"require-dev":{
4046
"phpunit/phpunit":"*",
4147
"phpunit/phpunit-mock-objects": "dev-master",
48+
"squizlabs/php_codesniffer": "1.4.7",
49+
"firegento/phpcs": "dev-patch-1",
4250
"composer/composer":"*@dev",
4351
"symfony/process":"*",
4452
"mikey179/vfsStream":"*"

run_phpcs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
#needs to do
3+
#cp /vendor/firegento/phpcs /vendor/firegento/FireGento
4+
#before
5+
./vendor/bin/phpcs --standard=./vendor/firegento/FireGento -p ./src

run_phpcs_experiment.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env php
2+
<?php
3+
die('should not get used, only to experiment with stuff');
4+
require_once __DIR__ . '/vendor/autoload.php';
5+
6+
// 2.x release
7+
//require __DIR__ . '/CodeSniffer.conf';
8+
//$GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = $phpCodeSnifferConfig;
9+
10+
if( !is_link(__DIR__.'/vendor/firegento/FireGento') ){
11+
symlink( __DIR__.'/vendor/firegento/phpcs', __DIR__.'/vendor/firegento/FireGento');
12+
}
13+
14+
#$tempSnifferObject = new PHP_CodeSniffer;
15+
#$tempSnifferObject->setTokenListeners( __DIR__.'/vendor/firegento/phpcs');
16+
17+
require_once __DIR__ . '/vendor/bin/phpcs';

0 commit comments

Comments
 (0)