Skip to content

Commit

Permalink
Merge pull request #169 from GrahamCampbell/cs
Browse files Browse the repository at this point in the history
Added ".styleci.yml" And Applied CS Fixes
  • Loading branch information
bobthecow committed Mar 1, 2015
2 parents 39fac19 + aad285e commit 9b285a5
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Symfony\CS\FixerInterface;
$config = Config::create()
// use symfony level and extra fixers:
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers(array('-concat_without_spaces', 'concat_with_spaces', 'strict'))
->fixers(array('align_double_arrow', '-concat_without_spaces', 'concat_with_spaces', 'ordered_use', 'strict'))
->setUsingLinter(false);

$finder = $config->getFinder()
Expand Down
10 changes: 10 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
preset: symfony

enabled:
- align_double_arrow
- concat_with_spaces
- ordered_use
- strict

disabled:
- concat_without_spaces
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ install:

script:
- vendor/bin/phpunit
- vendor/bin/phpcs -n --standard=phpcs.xml ./
- vendor/bin/php-cs-fixer --diff --dry-run -vv fix

matrix:
allow_failures:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
},
"require-dev": {
"phpunit/phpunit": "~3.7|~4.0",
"symfony/finder": "~2.1",
"symfony/finder": "~2.1|~3.0",
"squizlabs/php_codesniffer": "~2.0",
"fabpot/php-cs-fixer": "~1.3"
"fabpot/php-cs-fixer": "~1.5"
},
"suggest": {
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
Expand Down
4 changes: 2 additions & 2 deletions src/Psy/CodeCleaner/FunctionReturnInWriteContextPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

use PhpParser\Node;
use PhpParser\Node\Expr\Array_ as ArrayNode;
use PhpParser\Node\Expr\Empty_ as EmptyNode;
use PhpParser\Node\Expr\Isset_ as IssetNode;
use PhpParser\Node\Expr\Assign as AssignNode;
use PhpParser\Node\Expr\Empty_ as EmptyNode;
use PhpParser\Node\Expr\FuncCall as FunctionCall;
use PhpParser\Node\Expr\Isset_ as IssetNode;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
use Psy\Exception\FatalErrorException;
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/CodeCleaner/InstanceOfPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
namespace Psy\CodeCleaner;

use PhpParser\Node;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Expr\Instanceof_ as InstanceofStmt;
use PhpParser\Node\Scalar;
use PhpParser\Node\Scalar\Encapsed;
use PhpParser\Node\Expr\ConstFetch;
use Psy\Exception\FatalErrorException;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/CodeCleaner/StaticConstructorPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
namespace Psy\CodeCleaner;

use PhpParser\Node;
use PhpParser\Node\Stmt\Namespace_ as NamespaceStmt;
use PhpParser\Node\Stmt\Class_ as ClassStmt;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Namespace_ as NamespaceStmt;
use Psy\Exception\FatalErrorException;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/Command/HistoryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

use Psy\Output\ShellOutput;
use Psy\Readline\Readline;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Formatter\OutputFormatter;

/**
* Psy Shell history command.
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
use Psy\Exception\RuntimeException;
use Psy\Presenter\PresenterManager;
use Psy\Presenter\PresenterManagerAware;
use Symfony\Component\Console\Helper\TableHelper;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Helper\TableHelper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/Command/ListCommand/Enumerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Psy\Command\ListCommand;

use Psy\Formatter\SignatureFormatter;
use Psy\Util\Mirror;
use Psy\Presenter\PresenterManager;
use Psy\Util\Mirror;
use Symfony\Component\Console\Input\InputInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/Command/ListCommand/VariableEnumerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Psy\Command\ListCommand;

use Psy\Presenter\PresenterManager;
use Psy\Context;
use Psy\Presenter\PresenterManager;
use Symfony\Component\Console\Input\InputInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/Command/TraceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
namespace Psy\Command;

use Psy\Output\ShellOutput;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Formatter\OutputFormatter;

/**
* Show the current stack trace.
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/ExecutionLoop/Loop.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
namespace Psy\ExecutionLoop;

use Psy\Configuration;
use Psy\Shell;
use Psy\Exception\BreakException;
use Psy\Exception\ThrowUpException;
use Psy\Shell;

/**
* The Psy Shell execution loop.
Expand Down
2 changes: 1 addition & 1 deletion src/Psy/Formatter/SignatureFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Psy\Formatter;

use Psy\Util\Json;
use Psy\Reflection\ReflectionConstant;
use Psy\Util\Json;
use Symfony\Component\Console\Formatter\OutputFormatter;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Psy/Shell.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@

namespace Psy;

use Psy\Exception\ThrowUpException;
use Psy\Exception\BreakException;
use Psy\Exception\ErrorException;
use Psy\Exception\Exception as PsyException;
use Psy\Exception\ThrowUpException;
use Psy\Output\ShellOutput;
use Psy\Presenter\PresenterManagerAware;
use Psy\TabCompletion\Matcher;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command as BaseCommand;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\ArgvInput;

/**
* The Psy Shell application.
Expand Down
4 changes: 2 additions & 2 deletions test/Psy/Test/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

namespace Psy\Test;

use Psy\Configuration;
use Psy\CodeCleaner;
use Psy\Output\PassthruPager;
use Psy\Configuration;
use Psy\ExecutionLoop\Loop;
use Psy\Output\PassthruPager;
use Symfony\Component\Console\Output\ConsoleOutput;

class ConfigurationTest extends \PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/Psy/Test/Exception/BreakExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Psy\Test\Exception;

use Psy\Exception\Exception;
use Psy\Exception\BreakException;
use Psy\Exception\Exception;

class BreakExceptionTest extends \PHPUnit_Framework_TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion test/Psy/Test/Exception/ErrorExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Psy\Test\Exception;

use Psy\Exception\Exception;
use Psy\Exception\ErrorException;
use Psy\Exception\Exception;

class ErrorExceptionTest extends \PHPUnit_Framework_TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion test/Psy/Test/Formatter/SignatureFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Psy\Test\Formatter;

use Psy\Reflection\ReflectionConstant;
use Psy\Formatter\SignatureFormatter;
use Psy\Reflection\ReflectionConstant;

class SignatureFormatterTest extends \PHPUnit_Framework_TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion test/Psy/Test/ShellTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

namespace Psy\Test;

use Psy\Configuration;
use Psy\Exception\ErrorException;
use Psy\Exception\ParseErrorException;
use Psy\Shell;
use Psy\Configuration;
use Symfony\Component\Console\Output\StreamOutput;

class ShellTest extends \PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/Psy/Test/Util/MirrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Psy\Test\Util;

use Psy\Util\Mirror;
use Psy\Reflection\ReflectionConstant;
use Psy\Util\Mirror;

class MirrorTest extends \PHPUnit_Framework_TestCase
{
Expand Down

0 comments on commit 9b285a5

Please sign in to comment.