Skip to content

Commit

Permalink
Merge branch '2.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Apr 7, 2021
2 parents 7c9b832 + cbde9be commit 082a84b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions src/Documentation/DocumentationGenerator.php
Expand Up @@ -14,8 +14,7 @@

use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Console\Command\HelpCommand;
use PhpCsFixer\Diff\GeckoPackages\DiffOutputBuilder\UnifiedDiffOutputBuilder;
use PhpCsFixer\Diff\v2_0\Differ;
use PhpCsFixer\Differ\FullDiffer;
use PhpCsFixer\Fixer\Basic\Psr0Fixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
use PhpCsFixer\Fixer\ConfigurationDefinitionFixerInterface;
Expand All @@ -42,19 +41,15 @@
final class DocumentationGenerator
{
/**
* @var Differ
* @var FullDiffer
*/
private $differ;

private $path;

public function __construct()
{
$this->differ = new Differ(new UnifiedDiffOutputBuilder([
'contextLines' => 1024, // number large enough to have all lines in diff
'fromFile' => 'Original',
'toFile' => 'New',
]));
$this->differ = new FullDiffer();

$this->path = \dirname(__DIR__, 2).'/doc';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest.php
Expand Up @@ -41,7 +41,7 @@ protected static function getFixturesDir()
*/
protected static function getTempFile()
{
return self::getFixturesDir().\DIRECTORY_SEPARATOR.'.tmp.php';
return tempnam(sys_get_temp_dir(), 'PHP-CS-Fixer');
}

/**
Expand Down

0 comments on commit 082a84b

Please sign in to comment.