Skip to content

Commit

Permalink
Aktualisiere PHP-CS-Fixer auf v3.62.0 (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude authored Aug 26, 2024
1 parent 64a198d commit 109e39e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fix-cs-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Run PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:3.26.0
uses: docker://ghcr.io/webfactory/php-cs-fixer:3.62.0

- name: Commit and push back changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
2 changes: 1 addition & 1 deletion src/Webfactory/Slimdump/Config/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(SimpleXMLElement $config)
if (\defined($const)) {
$this->dump = \constant($const);
} else {
throw new InvalidDumpTypeException(sprintf('Invalid dump type %s for column %s.', $attr->dump, $this->selector));
throw new InvalidDumpTypeException(\sprintf('Invalid dump type %s for column %s.', $attr->dump, $this->selector));
}

$this->fakerReplacer = new FakerReplacer();
Expand Down
2 changes: 1 addition & 1 deletion src/Webfactory/Slimdump/Config/ConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function createFromXmlString($xmlString)
$errorAsString = '';
foreach ($errors as $error) {
/* @var libXMLError $error */
$errorAsString .= sprintf("%s %d: %s\n", $error->file, $error->line, $error->message);
$errorAsString .= \sprintf("%s %d: %s\n", $error->file, $error->line, $error->message);
}
throw new InvalidXmlException("Invalid XML! Errors:\n$errorAsString");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Webfactory/Slimdump/Config/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(SimpleXMLElement $config)
if (\defined($const)) {
$this->dump = \constant($const);
} else {
throw new InvalidDumpTypeException(sprintf('Invalid dump type %s for table %s.', $attr->dump, $this->selector));
throw new InvalidDumpTypeException(\sprintf('Invalid dump type %s for table %s.', $attr->dump, $this->selector));
}

$this->keepAutoIncrement = self::attributeToBoolean($attr->{'keep-auto-increment'}, true);
Expand Down
2 changes: 1 addition & 1 deletion src/Webfactory/Slimdump/Database/CsvOutputFormatDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CsvOutputFormatDriver implements OutputFormatDriverInterface
public function __construct(string $directory, Connection $connection)
{
if (!is_dir($directory) || !is_writable($directory)) {
throw new InvalidArgumentException(sprintf('The directoy "%s" does not exist or is not writeable', $directory));
throw new InvalidArgumentException(\sprintf('The directoy "%s" does not exist or is not writeable', $directory));
}

$this->directory = $directory;
Expand Down
4 changes: 2 additions & 2 deletions src/Webfactory/Slimdump/Database/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private function dumpData(Schema\Table $asset, Table $tableConfig): void
$table = $asset->getName();
$columnOrder = array_map(function (array $columnInfo): string {
return $columnInfo['Field'];
}, $this->connection->fetchAllAssociative(sprintf('SHOW COLUMNS FROM `%s`', $asset->getName())));
}, $this->connection->fetchAllAssociative(\sprintf('SHOW COLUMNS FROM `%s`', $asset->getName())));

$s = 'SELECT ';
$first = true;
Expand Down Expand Up @@ -152,7 +152,7 @@ private function dumpData(Schema\Table $asset, Table $tableConfig): void
$this->progressOutput->write("\n"); // write a newline after the progressbar.

if ($actualRows !== $numRows) {
$this->progressOutput->writeln(sprintf('<error>Expected %d rows, actually processed %d – verify results!</error>', $numRows, $actualRows));
$this->progressOutput->writeln(\sprintf('<error>Expected %d rows, actually processed %d – verify results!</error>', $numRows, $actualRows));
}

$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
Expand Down
8 changes: 4 additions & 4 deletions src/Webfactory/Slimdump/Database/MysqlOutputFormatDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MysqlOutputFormatDriver implements OutputFormatDriverInterface
/**
* @param int|null $maxBufferSize Default buffer size is 100MB
*/
public function __construct(OutputInterface $output, Connection $db, int $maxBufferSize = null, bool $singleLineInsertStatements = false)
public function __construct(OutputInterface $output, Connection $db, ?int $maxBufferSize = null, bool $singleLineInsertStatements = false)
{
$this->output = $output;
$this->db = $db;
Expand All @@ -49,7 +49,7 @@ public function endDump(): void
public function dumpCharacterSetConnection(): void
{
$charset = $this->db->fetchNumeric("SHOW VARIABLES LIKE 'character_set_connection'")[1];
$this->output->writeln(sprintf('SET NAMES %s;', $charset));
$this->output->writeln(\sprintf('SET NAMES %s;', $charset));
}

public function dumpTableStructure(Schema\Table $asset, Table $config): void
Expand All @@ -72,7 +72,7 @@ public function dumpTriggerDefinition(Schema\Table $asset, Table $config): void
{
$tableName = $asset->getName();

$triggers = $this->db->fetchAllAssociative(sprintf('SHOW TRIGGERS LIKE %s', $this->db->quote($tableName)));
$triggers = $this->db->fetchAllAssociative(\sprintf('SHOW TRIGGERS LIKE %s', $this->db->quote($tableName)));

if (!$triggers) {
return;
Expand Down Expand Up @@ -132,7 +132,7 @@ private function writeInsertStatementEnd(): void

private function insertValuesStatement(array $row, Schema\Table $asset): string
{
return sprintf('INSERT INTO `%s` (`%s`) VALUES ', $asset->getName(), implode('`, `', array_keys($row)));
return \sprintf('INSERT INTO `%s` (`%s`) VALUES ', $asset->getName(), implode('`, `', array_keys($row)));
}

public function beginTableDataDump(Schema\Table $asset, Table $config): void
Expand Down

0 comments on commit 109e39e

Please sign in to comment.