Skip to content

Commit

Permalink
Merge pull request #392 from localheinz/feature/php-cs-fixer
Browse files Browse the repository at this point in the history
Enhancement: Update `friendsofphp/php-cs-fixer`
  • Loading branch information
theseer committed Jan 31, 2023
2 parents f03aafc + acb12f4 commit 35fb5c7
Show file tree
Hide file tree
Showing 90 changed files with 4 additions and 107 deletions.
2 changes: 1 addition & 1 deletion phive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<phar name="phpab" version="^1.27" installed="1.27.1" location="./tools/phpab" copy="false"/>
<phar name="phpunit" version="^9.5" installed="9.5.19" location="./tools/phpunit" copy="false"/>
<phar name="phpstan" version="^1.0" installed="1.4.10" location="./tools/phpstan" copy="false"/>
<phar name="php-cs-fixer" version="^3.4" installed="3.8.0" location="./tools/php-cs-fixer" copy="false"/>
<phar name="php-cs-fixer" version="^3.13.2" installed="3.13.2" location="./tools/php-cs-fixer" copy="false"/>
<phar name="psalm" version="^4.0" installed="4.22.0" location="./tools/psalm" copy="false"/>
</phive>
1 change: 0 additions & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use PharIo\Version\VersionConstraintParser;

class Factory {

/** @var null|CurlConfig */
private $curlConfig;

Expand Down
1 change: 0 additions & 1 deletion src/commands/CommandLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function sprintf;

class CommandLocator implements Cli\CommandLocator {

/** @var Factory */
private $factory;

Expand Down
2 changes: 1 addition & 1 deletion src/commands/composer/ComposerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function sprintf;

class ComposerCommand extends InstallCommand {

/** @var ComposerService */
private $composerService;

Expand Down Expand Up @@ -47,6 +46,7 @@ public function execute(): void {
/**
* @psalm-suppress MoreSpecificReturnType
* @psalm-suppress LessSpecificReturnStatement
*
* @psalm-return ComposerCommandConfig
*/
protected function getConfig(): InstallCommandConfig {
Expand Down
1 change: 0 additions & 1 deletion src/commands/composer/ComposerCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PharIo\FileSystem\Filename;

class ComposerCommandConfig extends InstallCommandConfig {

/** @var Directory */
private $workingDirectory;

Expand Down
1 change: 0 additions & 1 deletion src/commands/composer/ComposerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use PharIo\Version\VersionConstraintParser;

class ComposerService {

/** @var SourcesList */
private $sourcesList;

Expand Down
1 change: 0 additions & 1 deletion src/commands/default/DefaultCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class DefaultCommand implements Cli\Command {

/** @var VersionCommand */
private $versionCommand;

Expand Down
1 change: 0 additions & 1 deletion src/commands/default/DefaultCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class DefaultCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/commands/help/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use function str_replace;

class HelpCommand implements Cli\Command {

/** @var Environment */
private $environment;

Expand Down
1 change: 0 additions & 1 deletion src/commands/install/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PharIo\FileSystem\Filename;

class InstallCommand implements Cli\Command {

/** @var InstallCommandConfig */
private $config;

Expand Down
1 change: 0 additions & 1 deletion src/commands/install/InstallCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use PharIo\Version\VersionConstraintParser;

class InstallCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/commands/list/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function count;

class ListCommand implements Cli\Command {

/** @var SourcesList */
private $sourcesList;

Expand Down
1 change: 0 additions & 1 deletion src/commands/migrate/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PharIo\Phive\Cli\ConsoleTable;

class MigrateCommand implements Cli\Command {

/** @var MigrateCommandConfig */
private $config;

Expand Down
1 change: 0 additions & 1 deletion src/commands/migrate/MigrateCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class MigrateCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/commands/outdated/OutdatedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use PharIo\Phive\Cli\ConsoleTable;

class OutdatedCommand implements Cli\Command {

/** @var PhiveXmlConfig */
private $phiveXmlConfig;

Expand Down
1 change: 0 additions & 1 deletion src/commands/outdated/OutdatedConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use PharIo\FileSystem\Filename;

class OutdatedConfig {

/** @var Cli\Options */
private $options;

Expand Down
1 change: 0 additions & 1 deletion src/commands/purge/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function sprintf;

class PurgeCommand implements Cli\Command {

/** @var PharRegistry */
private $repository;

Expand Down
1 change: 0 additions & 1 deletion src/commands/remove/RemoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function sprintf;

class RemoveCommand implements Cli\Command {

/** @var RemoveCommandConfig */
private $config;

Expand Down
1 change: 0 additions & 1 deletion src/commands/remove/RemoveCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use PharIo\FileSystem\Directory;

class RemoveCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/commands/reset/ResetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function in_array;

class ResetCommand implements Cli\Command {

/** @var ResetCommandConfig */
private $config;

Expand Down
1 change: 0 additions & 1 deletion src/commands/reset/ResetCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class ResetCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/commands/selfupdate/SelfupdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use PharIo\Version\Version;

class SelfupdateCommand implements Cli\Command {

/** @var PharDownloader */
private $pharDownloader;

Expand Down
1 change: 0 additions & 1 deletion src/commands/skel/SkelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use PharIo\Phive\Cli\Output;

class SkelCommand implements Cli\Command {

/** @var SkelCommandConfig */
private $config;

Expand Down
1 change: 0 additions & 1 deletion src/commands/skel/SkelCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function rtrim;

class SkelCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/commands/status/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use PharIo\Phive\Cli\ConsoleTable;

class StatusCommand implements Cli\Command {

/** @var Cli\Output */
private $output;

Expand Down
1 change: 0 additions & 1 deletion src/commands/status/StatusCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use PharIo\Version\AnyVersionConstraint;

class StatusCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use PharIo\Phive\Cli\Command;

class UpdateRepositoryListCommand implements Command {

/** @var RemoteSourcesListFileLoader */
private $loader;

Expand Down
1 change: 0 additions & 1 deletion src/commands/update/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class UpdateCommand implements Cli\Command {

/** @var UpdateCommandConfig */
private $config;

Expand Down
1 change: 0 additions & 1 deletion src/commands/update/UpdateCommandConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PharIo\FileSystem\Directory;

class UpdateCommandConfig {

/** @var Cli\Options */
private $cliOptions;

Expand Down
1 change: 0 additions & 1 deletion src/services/key/KeyImportResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class KeyImportResult {

/** @var int */
private $count;

Expand Down
1 change: 0 additions & 1 deletion src/services/key/KeyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use function sprintf;

class KeyService {

/** @var KeyDownloader */
private $keyDownloader;

Expand Down
1 change: 0 additions & 1 deletion src/services/key/PublicKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use DateTimeImmutable;

class PublicKey {

/** @var string */
private $id;

Expand Down
1 change: 0 additions & 1 deletion src/services/key/TrustedCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function in_array;

class TrustedCollection {

/** @var string[] */
private $keyIds = [];

Expand Down
1 change: 0 additions & 1 deletion src/services/key/gpg/PublicKeyReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use PharIo\FileSystem\Filename;

class PublicKeyReader {

/** @var GnuPG */
private $gnupg;

Expand Down
1 change: 0 additions & 1 deletion src/services/migration/HomePharsXmlMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use PharIo\FileSystem\Filename;

class HomePharsXmlMigration implements Migration {

/** @var Filename */
private $legacy;

Expand Down
1 change: 0 additions & 1 deletion src/services/migration/MigrationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive;

class MigrationFactory {

/** @var Factory */
private $factory;
/** @var Cli\Input */
Expand Down
1 change: 0 additions & 1 deletion src/services/migration/MigrationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use function count;

class MigrationService {

/** @var MigrationFactory */
private $factory;

Expand Down
1 change: 0 additions & 1 deletion src/services/phar/CompatibilityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function canRun(Phar $phar): bool {

foreach ($manifest->getRequirements() as $requirement) {
switch (true) {

case $requirement instanceof PhpVersionRequirement: {
$php = $requirement->getVersionConstraint();

Expand Down
1 change: 0 additions & 1 deletion src/services/phar/RemovalService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PharIo\Phive\Cli\Output;

class RemovalService {

/** @var Environment */
private $environment;

Expand Down
1 change: 1 addition & 0 deletions src/services/resolver/GithubAliasResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private function localResolve(string $name): GithubRepository {

/**
* @throws GithubAliasResolverException
*
* @psalm-assert !null $this->rateLimit
*/
private function ensureWithinRateLimit(): void {
Expand Down
1 change: 0 additions & 1 deletion src/services/signature/gpg/GnupgVerificationResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use PharIo\GnuPG\ErrorStrings;

class GnupgVerificationResult implements VerificationResult {

/** @var array */
private $verificationData;

Expand Down
1 change: 0 additions & 1 deletion src/shared/GnuPG.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PharIo\FileSystem\Directory;

class GnuPG {

/** @var \GnuPG */
private $gnupg;

Expand Down
1 change: 0 additions & 1 deletion src/shared/PharRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use PharIo\Version\Version;

class PharRegistry {

/** @var Directory */
private $pharDirectory;

Expand Down
1 change: 0 additions & 1 deletion src/shared/cli/CommandLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace PharIo\Phive\Cli;

interface CommandLocator {

/**
* @throws CommandLocatorException
*/
Expand Down
1 change: 0 additions & 1 deletion src/shared/cli/GeneralContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use function strlen;

abstract class GeneralContext implements Context {

/** @var Options */
private $options;

Expand Down
1 change: 0 additions & 1 deletion src/shared/cli/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use function sprintf;

class Options {

/** @var array<string, mixed> */
private $options = [];

Expand Down
1 change: 0 additions & 1 deletion src/shared/cli/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use OutOfBoundsException;

class Request {

/** @var array */
private $argv;

Expand Down
1 change: 0 additions & 1 deletion src/shared/cli/input/ConsoleInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use function strtolower;

class ConsoleInput implements Input {

/** @var Output */
private $output;

Expand Down
1 change: 0 additions & 1 deletion src/shared/cli/output/ColoredConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public function writeWarning(string $warningMessage): void {
}

public function writeMarkdown(string $markdown): void {

// bold => yellow
$markdown = preg_replace_callback('/(\*\*|__)(.*?)\1/', static function (array $matches): string {
return "\033[33m" . $matches[2] . "\033[0m"; // 0m
Expand Down

0 comments on commit 35fb5c7

Please sign in to comment.