Fix bin/publish: copy docs.dist from project root

Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 02:08:33 +00:00
commit f6fac6c4bc
79758 changed files with 10547827 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* @readonly
*/
final class CodeSample implements CodeSampleInterface
{
private string $code;
/**
* @var null|array<string, mixed>
*/
private ?array $configuration;
/**
* @param null|array<string, mixed> $configuration
*/
public function __construct(string $code, ?array $configuration = null)
{
$this->code = $code;
$this->configuration = $configuration;
}
public function getCode(): string
{
return $this->code;
}
public function getConfiguration(): ?array
{
return $this->configuration;
}
}

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
*/
interface CodeSampleInterface
{
public function getCode(): string;
/**
* @return null|array<string, mixed>
*/
public function getConfiguration(): ?array;
}

View File

@@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* @readonly
*
* @internal
*/
final class FileSpecificCodeSample implements FileSpecificCodeSampleInterface
{
private CodeSampleInterface $codeSample;
private \SplFileInfo $splFileInfo;
/**
* @param null|array<string, mixed> $configuration
*/
public function __construct(
string $code,
\SplFileInfo $splFileInfo,
?array $configuration = null
) {
$this->codeSample = new CodeSample($code, $configuration);
$this->splFileInfo = $splFileInfo;
}
public function getCode(): string
{
return $this->codeSample->getCode();
}
public function getConfiguration(): ?array
{
return $this->codeSample->getConfiguration();
}
public function getSplFileInfo(): \SplFileInfo
{
return $this->splFileInfo;
}
}

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* @internal
*/
interface FileSpecificCodeSampleInterface extends CodeSampleInterface
{
public function getSplFileInfo(): \SplFileInfo;
}

View File

@@ -0,0 +1,76 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* @readonly
*/
final class FixerDefinition implements FixerDefinitionInterface
{
private string $summary;
/**
* @var list<CodeSampleInterface>
*/
private array $codeSamples;
/**
* Description of Fixer and benefit of using it.
*/
private ?string $description;
/**
* Description why Fixer is risky.
*/
private ?string $riskyDescription;
/**
* @param list<CodeSampleInterface> $codeSamples array of samples, where single sample is [code, configuration]
* @param null|string $riskyDescription null for non-risky fixer
*/
public function __construct(
string $summary,
array $codeSamples,
?string $description = null,
?string $riskyDescription = null
) {
$this->summary = $summary;
$this->codeSamples = $codeSamples;
$this->description = $description;
$this->riskyDescription = $riskyDescription;
}
public function getSummary(): string
{
return $this->summary;
}
public function getDescription(): ?string
{
return $this->description;
}
public function getRiskyDescription(): ?string
{
return $this->riskyDescription;
}
public function getCodeSamples(): array
{
return $this->codeSamples;
}
}

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
*/
interface FixerDefinitionInterface
{
public function getSummary(): string;
public function getDescription(): ?string;
/**
* @return null|string null for non-risky fixer
*/
public function getRiskyDescription(): ?string;
/**
* Array of samples, where single sample is [code, configuration].
*
* @return list<CodeSampleInterface>
*/
public function getCodeSamples(): array;
}

View File

@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Andreas Möller <am@localheinz.com>
*
* @readonly
*/
final class VersionSpecificCodeSample implements VersionSpecificCodeSampleInterface
{
private CodeSampleInterface $codeSample;
private VersionSpecificationInterface $versionSpecification;
/**
* @param null|array<string, mixed> $configuration
*/
public function __construct(
string $code,
VersionSpecificationInterface $versionSpecification,
?array $configuration = null
) {
$this->codeSample = new CodeSample($code, $configuration);
$this->versionSpecification = $versionSpecification;
}
public function getCode(): string
{
return $this->codeSample->getCode();
}
public function getConfiguration(): ?array
{
return $this->codeSample->getConfiguration();
}
public function isSuitableFor(int $version): bool
{
return $this->versionSpecification->isSatisfiedBy($version);
}
}

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Andreas Moeller <am@localheinz.com>
*/
interface VersionSpecificCodeSampleInterface extends CodeSampleInterface
{
public function isSuitableFor(int $version): bool;
}

View File

@@ -0,0 +1,76 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Andreas Möller <am@localheinz.com>
*
* @readonly
*/
final class VersionSpecification implements VersionSpecificationInterface
{
/**
* @var null|int<1, max>
*/
private ?int $minimum;
/**
* @var null|int<1, max>
*/
private ?int $maximum;
/**
* @param null|int<1, max> $minimum
* @param null|int<1, max> $maximum
*
* @throws \InvalidArgumentException
*/
public function __construct(?int $minimum = null, ?int $maximum = null)
{
if (null === $minimum && null === $maximum) {
throw new \InvalidArgumentException('Minimum or maximum need to be specified.');
}
if (null !== $minimum && 1 > $minimum) {
throw new \InvalidArgumentException('Minimum needs to be either null or an integer greater than 0.');
}
if (null !== $maximum) {
if (1 > $maximum) {
throw new \InvalidArgumentException('Maximum needs to be either null or an integer greater than 0.');
}
if (null !== $minimum && $maximum < $minimum) {
throw new \InvalidArgumentException('Maximum should not be lower than the minimum.');
}
}
$this->minimum = $minimum;
$this->maximum = $maximum;
}
public function isSatisfiedBy(int $version): bool
{
if (null !== $this->minimum && $version < $this->minimum) {
return false;
}
if (null !== $this->maximum && $version > $this->maximum) {
return false;
}
return true;
}
}

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\FixerDefinition;
/**
* @author Andreas Möller <am@localheinz.com>
*/
interface VersionSpecificationInterface
{
public function isSatisfiedBy(int $version): bool;
}