Skip to content

Commit

Permalink
move the project to sugared-rim ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
schnittstabil committed Nov 8, 2016
1 parent 52b8cfb commit 139c493
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 28 deletions.
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "schnittstabil/sugared-php_codesniffer",
"name": "sugared-rim/php_codesniffer",
"type": "library",
"description": "PHP_CodeSniffer sweetened with ease",
"license": "MIT",
"keywords": ["sugared", "preconfigured", "php_codesniffer", "phpcs", "standards"],
"keywords": ["sugared", "preconfigured", "php_codesniffer", "phpcs", "standards", "sugared-rim"],
"authors": [
{
"name": "Michael Mayer",
"email": "michael@schnittstabil.de"
}
],
"autoload": {
"psr-4": { "Schnittstabil\\Sugared\\PHP\\CodeSniffer\\": "src" }
"psr-4": { "SugaredRim\\PHP\\CodeSniffer\\": "src" }
},
"autoload-dev": {
"psr-4": { "Schnittstabil\\Sugared\\PHP\\CodeSniffer\\": "tests" }
"psr-4": { "SugaredRim\\PHP\\CodeSniffer\\": "tests" }
},
"require": {
"php": ">=5.6.0",
Expand All @@ -23,19 +23,19 @@
"squizlabs/php_codesniffer": "^2.6.1"
},
"require-dev": {
"schnittstabil/sugared-phpunit": "^1.0"
"sugared-rim/phpunit": "^2.0"
},
"extra": {
"schnittstabil\/sugared-php_codesniffer test namespace": {
"sugared-rim/php_codesniffer test namespace": {
"default_standard": ["PSR1", "PSR2"],
"files": {
"in": "tests/fixtures"
}
}
},
"bin": [
"sugared-phpcbf",
"sugared-phpcs"
"sugared-bin-phpcbf",
"sugared-bin-phpcs"
],
"scripts": {
"clean": "rm -rf build/",
Expand All @@ -50,9 +50,9 @@
"php-cs-fixer fix --dry-run --diff tests"
],
"test": [
"sugared-phpunit",
"sugared-rim-phpunit",
"composer lint"
],
"travis": "sugared-phpunit"
"travis": "sugared-rim-phpunit"
}
}
21 changes: 11 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# Sugared\PHP_CodeSniffer [![Build Status](https://travis-ci.org/schnittstabil/sugared-php_codesniffer.svg?branch=master)](https://travis-ci.org/schnittstabil/sugared-php_codesniffer) [![Coverage Status](https://coveralls.io/repos/schnittstabil/sugared-php_codesniffer/badge.svg?branch=master&service=github)](https://coveralls.io/github/schnittstabil/sugared-php_codesniffer?branch=master) [![Code Climate](https://codeclimate.com/github/schnittstabil/sugared-php_codesniffer/badges/gpa.svg)](https://codeclimate.com/github/schnittstabil/sugared-php_codesniffer)
# SugaredRim\PHP_CodeSniffer
[![Build Status](https://travis-ci.org/sugared-rim/php_codesniffer.svg?branch=master)](https://travis-ci.org/sugared-rim/php_codesniffer) [![Coverage Status](https://coveralls.io/repos/sugared-rim/php_codesniffer/badge.svg?branch=master&service=github)](https://coveralls.io/github/sugared-rim/php_codesniffer?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sugared-rim/php_codesniffer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sugared-rim/php_codesniffer/?branch=master) [![Code Climate](https://codeclimate.com/github/sugared-rim/php_codesniffer/badges/gpa.svg)](https://codeclimate.com/github/sugared-rim/php_codesniffer)

[![SensioLabsInsight](https://insight.sensiolabs.com/projects/44d3d0b9-d0bd-4714-85d5-1a5cb34522ca/big.png)](https://insight.sensiolabs.com/projects/44d3d0b9-d0bd-4714-85d5-1a5cb34522ca)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/7696dfd1-680f-4da6-addb-35b208e146f2/big.png)](https://insight.sensiolabs.com/projects/7696dfd1-680f-4da6-addb-35b208e146f2)

> PHP_CodeSniffer sweetened with ease :cherries:
Sugared\PHP_CodeSniffer takes an opinionated view of code style checking with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), it is preconfigured to get you up and running as quickly as possible.
SugaredRim\PHP_CodeSniffer takes an opinionated view of code style checking with [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), it is preconfigured to get you up and running as quickly as possible.

## Install

```
$ composer require --dev schnittstabil/sugared-php_codesniffer
$ composer require --dev sugared-rim/php_codesniffer
```

## Usage

Instead of running `phpcs` with all its options, just run `sugared-phpcs` - that's it:
Instead of running `phpcs` with all its options, just run `sugared-rim-phpcs` - that's it:

```json
{
...
"require-dev": {
"schnittstabil/sugared-php_codesniffer": ...
"sugared-rim/php_codesniffer": ...
},
"scripts": {
"lint": "sugared-phpcs"
"lint": "sugared-rim-phpcs"
}
}
```
Expand All @@ -39,10 +40,10 @@ Some of the default settings:
{
...
"scripts": {
"lint": "sugared-phpcs"
"lint": "sugared-rim-phpcs"
},
"extra": {
"schnittstabil\/sugared-php_codesniffer": {
"sugared-rim/php_codesniffer": {
"default_standard": ["PSR1", "PSR2"],
"files": {
"in": ["."],
Expand All @@ -62,7 +63,7 @@ Some of the default settings:
}
```

All `extra.schnittstabil/sugared-php_codesniffer` options are passed through [PHP_CodeSniffer::setConfigData](https://github.com/squizlabs/PHP_CodeSniffer/blob/2.6.0/CodeSniffer.php#L2353), except:
All `extra.sugared-rim/php_codesniffer` options are passed through [PHP_CodeSniffer::setConfigData](https://github.com/squizlabs/PHP_CodeSniffer/blob/2.6.0/CodeSniffer.php#L2353), except:

* `files`: Array of files and/or directories to check.

Expand Down
6 changes: 3 additions & 3 deletions src/CLI.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace Schnittstabil\Sugared\PHP\CodeSniffer;
namespace SugaredRim\PHP\CodeSniffer;

use Schnittstabil\ComposerExtra\ComposerExtra;
use Schnittstabil\FinderByConfig\FinderByConfig;

class CLI extends \PHP_CodeSniffer_CLI
{
protected $namespace = 'schnittstabil/sugared-php_codesniffer';
protected $namespace = 'sugared-rim/php_codesniffer';
protected $finderByConfig;
protected $defaultConfig;
protected $config;
Expand All @@ -21,7 +21,7 @@ public function __construct(callable $finderByConfig = null)

$this->defaultConfig = new \stdClass();
$this->defaultConfig->presets = [
'Schnittstabil\\Sugared\\PHP\\CodeSniffer\\DefaultPreset::get',
'SugaredRim\\PHP\\CodeSniffer\\DefaultPreset::get',
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/DefaultPreset.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Schnittstabil\Sugared\PHP\CodeSniffer;
namespace SugaredRim\PHP\CodeSniffer;

class DefaultPreset
{
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/CLITest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Schnittstabil\Sugared\PHP\CodeSniffer;
namespace SugaredRim\PHP\CodeSniffer;

class CLITest extends \PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -42,18 +42,18 @@ public function testgetCommandLineValuesShouldReturnFiles()
public function testgetCommandLineValuesShouldReturnOverwritenFiles()
{
$sut = new CLI();
$sut->setCommandLineValues(['sugared-phpcs']);
$sut->setCommandLineValues(['sugared-rim-phpcs']);
$values = $sut->getCommandLineValues();

$this->assertSame([realpath('sugared-phpcs')], $values['files']);
$this->assertSame([realpath('sugared-rim-phpcs')], $values['files']);
}

public function testgetCommandLineValuesShouldReturnNamespacedConfig()
{
$sut = new CLI();
$sut->setCommandLineValues([
'--report=summary',
'--namespace=schnittstabil/sugared-php_codesniffer test namespace',
'--namespace=sugared-rim/php_codesniffer test namespace',
]);
$values = $sut->getCommandLineValues();

Expand Down

0 comments on commit 139c493

Please sign in to comment.