Skip to content
Snippets Groups Projects
Commit 80640f74 authored by Tim Plunkett's avatar Tim Plunkett
Browse files

Initial PHPCS fixes

parent b746998f
No related branches found
No related tags found
1 merge request!678Resolve #3501590 "Increase phpstan level"
......@@ -2,7 +2,6 @@
namespace Drupal\project_browser_source_example\Plugin\ProjectBrowserSource;
use Drupal\Core\Extension\ModuleExtensionList;
use Drupal\project_browser\Plugin\ProjectBrowserSourceBase;
use Drupal\project_browser\ProjectBrowser\Project;
use Drupal\project_browser\ProjectBrowser\ProjectsResultsPage;
......@@ -31,15 +30,12 @@ class ProjectBrowserSourceExample extends ProjectBrowserSourceBase {
* The plugin implementation definition.
* @param \Symfony\Component\HttpFoundation\RequestStack $requestStack
* The request from the browser.
* @param \Drupal\Core\Extension\ModuleExtensionList $moduleExtensionList
* The module extension list.
*/
public function __construct(
array $configuration,
$plugin_id,
$plugin_definition,
protected readonly RequestStack $requestStack,
protected ModuleExtensionList $moduleExtensionList,
) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
}
......@@ -53,7 +49,6 @@ class ProjectBrowserSourceExample extends ProjectBrowserSourceBase {
$plugin_id,
$plugin_definition,
$container->get(RequestStack::class),
$container->get(ModuleExtensionList::class),
);
}
......@@ -152,7 +147,6 @@ class ProjectBrowserSourceExample extends ProjectBrowserSourceBase {
// Images: Array of images using the same structure as $logo, above.
images: [],
);
$pb_path = $this->moduleExtensionList->getPath('project_browser');
$projects[] = new Project(
logo: $logo,
// Maybe the source won't have all fields, but we still need to
......
......@@ -100,10 +100,7 @@ class RecipesSourceTest extends KernelTestBase {
$expected_recipe_names[] = $core_recipe->getBasename();
}
/** @var \Drupal\project_browser\ProjectBrowser\ProjectsResultsPage $projects */
$projects = $this->container->get(ProjectBrowserSourceManager::class)
->createInstance('recipes')
->getProjects();
$projects = $source->getProjects();
$found_recipes = [];
foreach ($projects->list as $project) {
$this->assertNotEmpty($project->title);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment