Skip to content
Snippets Groups Projects
Commit 2291b488 authored by christian.wiedemann's avatar christian.wiedemann
Browse files

Issue #3498428 by christian.wiedemann: [2.0.0-rc2] Update PHPCS

parent 85939fc6
Branches
Tags
1 merge request!319fix wrong phpcbf errors
Pipeline #391787 passed
......@@ -4,12 +4,14 @@ declare(strict_types=1);
namespace Drupal\ui_patterns_legacy\Drush\Commands;
use Drush\Attributes\Usage;
use Drush\Attributes\Argument;
use Drush\Attributes\Command;
use Drupal\Core\Theme\ComponentPluginManager;
use Drupal\ui_patterns_legacy\ComponentConverter;
use Drupal\ui_patterns_legacy\ComponentDiscovery;
use Drupal\ui_patterns_legacy\ComponentWriter;
use Drupal\ui_patterns_legacy\StoryExtractor;
use Drush\Attributes as CLI;
use Drush\Commands\AutowireTrait;
use Drush\Commands\DrushCommands;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
......@@ -40,9 +42,9 @@ final class UiPatternsLegacyCommands extends DrushCommands {
/**
* Migrate components from UI Patterns 1.x to UI Patterns 2.x.
*/
#[CLI\Command(name: 'ui-patterns:migrate', aliases: ['upm'])]
#[CLI\Argument(name: 'extension', description: 'Module or theme machine name.')]
#[CLI\Usage(name: 'ui-patterns:migrate my_theme', description: 'Convert components, replace dependencies and API calls.')]
#[Command(name: 'ui-patterns:migrate', aliases: ['upm'])]
#[Argument(name: 'extension', description: 'Module or theme machine name.')]
#[Usage(name: 'ui-patterns:migrate my_theme', description: 'Convert components, replace dependencies and API calls.')]
public function migrate(string $extension): void {
if (!$this->discovery->extensionExists($extension)) {
print("Not found or not activated: " . $extension . "\n");
......
......@@ -40,7 +40,7 @@ final class StoriesSyntaxConversionTest extends UnitTestCase {
$test['value'],
$test['expected'],
];
};
}
}
/**
......
......@@ -14,7 +14,7 @@ use Drupal\Core\StringTranslation\TranslatableMarkup;
id: "ui_patterns_test_block",
admin_label: new TranslatableMarkup("Display message")
)]
class TestBlock extends BlockBase {
class TestBlock extends BlockBase {
/**
* {@inheritdoc}
......@@ -53,4 +53,4 @@ use Drupal\Core\StringTranslation\TranslatableMarkup;
];
}
}
}
......@@ -57,7 +57,7 @@ final class SchemaManagerTest extends KernelTestBase {
$sources = $file_contents ? Yaml::decode($file_contents) : [];
foreach ($sources as $source) {
yield [$source['schema'], $source['expected']];
};
}
}
/**
......
......@@ -40,7 +40,7 @@ final class CanonicalizerTest extends UnitTestCase {
$test['expected'],
];
}
};
}
}
}
......@@ -40,7 +40,7 @@ final class CompatibilityCheckerTest extends UnitTestCase {
$source['schema'],
$source['tests'],
];
};
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment