Skip to content

Commit

Permalink
[bugfix] fix files finder issue, remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexndr-novikov committed Oct 11, 2019
1 parent f1d5038 commit 5068a92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bin/spiral-cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class CodeStyleHelper
$finder = new Symfony\Component\Finder\Finder();
foreach ($paths as $path) {
if (is_file($path)) {
$this->normalizeContent($path);
$finder->append([$path]);
} else {
$finder->in($path);
}
Expand Down
8 changes: 3 additions & 5 deletions tests/CodeStyle/CodeStyleFixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@

namespace Spiral\Tests\CodeStyle;

use PHPUnit\Framework\TestCase;

class CodeStyleFixTest extends AbstractCodeStyleTest
{
public function testFix(): void
{
exec('bin/spiral-cs fix ' . $this->getRelativeFilePath(self::NOT_FORMATTED_FILE_NAME));
$this->assertEquals(
file_get_contents($this->getTempFilePath('NotFormattedClass.php')),
file_get_contents($this->getFixturesFilePath('FormattedClass.php')),
$this->assertFileEquals(
$this->notFormattedClassFilePath,
$this->getFixturesFilePath(self::FORMATTED_FILE_NAME)
);
}
}
8 changes: 1 addition & 7 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
<?php
/**
* Spiral Framework. Codestyle
* Spiral Framework. Code Style
*
* @license MIT
* @author Anton Titov (Wolfy-J)
* @author Alex Novikov
*/
// phpcs:ignoreFile
declare(strict_types=1);

define('SPIRAL_INITIAL_TIME', microtime(true));

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', '1');
mb_internal_encoding('UTF-8');

//Composer
require dirname(__DIR__) . '/vendor/autoload.php';

//Set to true to enter the Matrix
define('ENABLE_PROFILING', false);

0 comments on commit 5068a92

Please sign in to comment.