diff --git a/src/Command/BlacklistCommonCommand.php b/src/Command/BlacklistCommonCommand.php index f769eb2..6996480 100644 --- a/src/Command/BlacklistCommonCommand.php +++ b/src/Command/BlacklistCommonCommand.php @@ -37,13 +37,13 @@ protected function execute(InputInterface $input, OutputInterface $output) $file = realpath($input->getOption('file')); if (!file_exists($file)) { - $output->writeln('Unable to read passwords list. No such file: ' . $input->getOption('file') . ''); + $output->writeln('Unable to read passwords list. No such file: '.$input->getOption('file').''); return; } if (!is_readable($file)) { - $output->writeln('Unable to read passwords list. Access denied: ' . $input->getOption('file') . ''); + $output->writeln('Unable to read passwords list. Access denied: '.$input->getOption('file').''); return; } diff --git a/src/DependencyInjection/RollerworksPasswordStrengthExtension.php b/src/DependencyInjection/RollerworksPasswordStrengthExtension.php index 87a50a3..e485dad 100644 --- a/src/DependencyInjection/RollerworksPasswordStrengthExtension.php +++ b/src/DependencyInjection/RollerworksPasswordStrengthExtension.php @@ -35,7 +35,7 @@ public function load(array $configs, ContainerBuilder $container) $container->setAlias('rollerworks_password_strength.blacklist_provider', $config['blacklist']['default_provider']); - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('blacklist.xml'); if (isset($config['blacklist']['providers']['sqlite'])) { diff --git a/tests/Blacklist/SqliteProviderTest.php b/tests/Blacklist/SqliteProviderTest.php index 3a7c69a..04aba40 100644 --- a/tests/Blacklist/SqliteProviderTest.php +++ b/tests/Blacklist/SqliteProviderTest.php @@ -36,7 +36,7 @@ public static function setUpBeforeClass() @unlink(self::$dbFile); } - self::$provider = new SqliteProvider('sqlite:' . self::$dbFile); + self::$provider = new SqliteProvider('sqlite:'.self::$dbFile); } public static function tearDownAfterClass() diff --git a/tests/Command/BlacklistCommandTestCase.php b/tests/Command/BlacklistCommandTestCase.php index 20c8977..51d7a34 100644 --- a/tests/Command/BlacklistCommandTestCase.php +++ b/tests/Command/BlacklistCommandTestCase.php @@ -31,7 +31,7 @@ public static function setUpBeforeClass() @unlink(self::$dbFile); } - $sqliteProvider = new SqliteProvider('sqlite:' . self::$dbFile); + $sqliteProvider = new SqliteProvider('sqlite:'.self::$dbFile); self::$container = new Container(); self::$container->set('rollerworks_password_strength.blacklist.provider.sqlite', $sqliteProvider); diff --git a/tests/Command/BlacklistDeleteCommandTest.php b/tests/Command/BlacklistDeleteCommandTest.php index 71fd5bc..eaf46aa 100644 --- a/tests/Command/BlacklistDeleteCommandTest.php +++ b/tests/Command/BlacklistDeleteCommandTest.php @@ -113,7 +113,7 @@ public function testReadFromFile() $commandTester = new CommandTester($command); - $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list1.txt')); + $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list1.txt')); $this->assertRegExp('/Successfully removed 2 password\(s\) from your blacklist database/', $commandTester->getDisplay()); $this->assertFalse($this->getProvider()->isBlacklisted('test')); @@ -136,14 +136,14 @@ public function testImportExistingFromFile() $commandTester = new CommandTester($command); - $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list1.txt')); + $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list1.txt')); $this->assertRegExp('/Successfully removed 2 password\(s\) from your blacklist database/', $commandTester->getDisplay()); $this->assertFalse($this->getProvider()->isBlacklisted('test')); $this->assertFalse($this->getProvider()->isBlacklisted('foobar')); $this->assertTrue($this->getProvider()->isBlacklisted('kaboom')); - $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list1.txt')); + $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list1.txt')); $this->assertRegExp('/Successfully removed 0 password\(s\) from your blacklist database/', $commandTester->getDisplay()); } @@ -207,7 +207,7 @@ public function testImportFromEmptyFile() $commandTester = new CommandTester($command); $commandTester->execute( - array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list2.txt') + array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list2.txt') ); $this->assertRegExp('/Passwords list seems empty, are you sure this is the correct file\?/', $commandTester->getDisplay()); diff --git a/tests/Command/BlacklistUpdateCommandTest.php b/tests/Command/BlacklistUpdateCommandTest.php index b3b5298..d2b68a2 100644 --- a/tests/Command/BlacklistUpdateCommandTest.php +++ b/tests/Command/BlacklistUpdateCommandTest.php @@ -108,7 +108,7 @@ public function testImportFromFile() $this->assertFalse($this->getProvider()->isBlacklisted('foobar')); $commandTester = new CommandTester($command); - $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list1.txt')); + $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list1.txt')); $this->assertTrue($this->getProvider()->isBlacklisted('test')); $this->assertTrue($this->getProvider()->isBlacklisted('foobar')); @@ -128,7 +128,7 @@ public function testImportExistingFromFile() $this->assertFalse($this->getProvider()->isBlacklisted('foobar')); $commandTester = new CommandTester($command); - $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list1.txt')); + $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list1.txt')); $this->assertTrue($this->getProvider()->isBlacklisted('test')); $this->assertTrue($this->getProvider()->isBlacklisted('foobar')); @@ -136,7 +136,7 @@ public function testImportExistingFromFile() $this->assertTrue($this->getProvider()->isBlacklisted('test')); $this->assertTrue($this->getProvider()->isBlacklisted('foobar')); - $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list1.txt')); + $commandTester->execute(array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list1.txt')); $this->assertTrue($this->getProvider()->isBlacklisted('test')); $this->assertTrue($this->getProvider()->isBlacklisted('foobar')); @@ -202,7 +202,7 @@ public function testImportFromEmptyFile() $commandTester = new CommandTester($command); $commandTester->execute( - array('command' => $command->getName(), '--file' => __DIR__ . '/../fixtures/passwords-list2.txt') + array('command' => $command->getName(), '--file' => __DIR__.'/../fixtures/passwords-list2.txt') ); $this->assertRegExp('/Passwords list seems empty, are you sure this is the correct file\?/', $commandTester->getDisplay()); diff --git a/tests/DependencyInjection/ExtensionTest.php b/tests/DependencyInjection/ExtensionTest.php index 8013164..90a425e 100644 --- a/tests/DependencyInjection/ExtensionTest.php +++ b/tests/DependencyInjection/ExtensionTest.php @@ -113,7 +113,7 @@ public function testLoadWithChainConfiguration() protected function createContainer() { $container = new ContainerBuilder(new ParameterBag(array( - 'kernel.cache_dir' => __DIR__ . '/.cache' , + 'kernel.cache_dir' => __DIR__.'/.cache', 'kernel.charset' => 'UTF-8', 'kernel.debug' => false, ))); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 586e237..755ffce 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -13,11 +13,11 @@ error_reporting(E_ALL | E_STRICT); -if (!file_exists(__DIR__ . '/../vendor/autoload.php')) { +if (!file_exists(__DIR__.'/../vendor/autoload.php')) { throw new \RuntimeException('Did not find vendor/autoload.php. Please Install vendors using command: composer.phar install --dev'); } /** * @var $loader ClassLoader */ -$loader = require __DIR__ . '/../vendor/autoload.php'; +$loader = require __DIR__.'/../vendor/autoload.php';