Extract a phpactor mixin
This commit is contained in:
parent
44d2685854
commit
6443b72707
11 changed files with 13 additions and 7 deletions
|
@ -9,7 +9,6 @@
|
|||
./neovim
|
||||
./newsboat
|
||||
./notes.nix
|
||||
./phpactor
|
||||
./starship.nix
|
||||
./tmux.nix
|
||||
./tmux-sessionizer.nix
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
code_transform.class_new.variants:
|
||||
collection: collection
|
||||
default: default
|
||||
drupal-functional-test: drupal-functional-test
|
||||
drupal-kernel-test: drupal-kernel-test
|
||||
drupal-unit-test: drupal-unit-test
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
final class {{ class.name }} implements \IteratorAggregate {
|
||||
|
||||
public function __construct(private array $items = []) {
|
||||
}
|
||||
|
||||
public function getIterator(): \Iterator {
|
||||
return new \ArrayIterator($this->items);
|
||||
}
|
||||
|
||||
public function toArray(): array {
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
}
|
||||
{% endfor %}
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
final class {{ class.name }} {
|
||||
}
|
||||
{% endfor %}
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
final class {{ class.name }} extends BrowserTestBase {
|
||||
|
||||
public $defaultTheme = 'stark';
|
||||
|
||||
public static $modules = [];
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
}
|
||||
{% endfor %}
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
use Drupal\KernelTests\KernelTestBase;
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
final class {{ class.name }} extends KernelTestBase {
|
||||
|
||||
public static $modules = [];
|
||||
|
||||
protected $strictConfigSchema = FALSE;
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
}
|
||||
{% endfor %}
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
final class {{ class.name }} extends UnitTestCase {
|
||||
|
||||
}
|
||||
{% endfor %}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
xdg.configFile.phpactor = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue