Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/List/ObjectListTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ public function templateName(): string
return str_replace('_', '-', $this->name());
}

public function libraryName(): string
{
return match ($this) {
default => $this instanceof \BackedEnum ? $this->value : $this->name,
};
}

public function attachLibraries(): array
{
return [
sprintf('pinto/%s', $this->libraryName()),
];
}

public function build(callable $wrapper, object $object): callable
{
return function (mixed $build) use ($wrapper) {
Expand Down
10 changes: 0 additions & 10 deletions src/List/Resource/ObjectListEnumResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ public function templateName(): string
return $this->pintoEnum->templateName();
}

public function libraryName(): string
{
return $this->pintoEnum->libraryName();
}

public function attachLibraries(): array
{
return $this->pintoEnum->attachLibraries();
}

public function build(callable $wrapper, object $object): callable
{
return $this->pintoEnum->build($wrapper, $object);
Expand Down
12 changes: 0 additions & 12 deletions src/Resource/ResourceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ public function name(): string;
*/
public function templateName(): string;

/**
* Get the library name.
*/
public function libraryName(): string;

/**
* Get the libraries to attach.
*
* @return string[]
*/
public function attachLibraries(): array;

/**
* Build function called after an object build method.
*
Expand Down
2 changes: 0 additions & 2 deletions tests/PintoObjectListEnumResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public function testImmutabilityOffsetUnet(): void
static::assertEquals($enum->getClass(), $resource->getClass());
static::assertEquals($enum->name(), $resource->name());
static::assertEquals($enum->templateName(), $resource->templateName());
static::assertEquals($enum->libraryName(), $resource->libraryName());
static::assertEquals($enum->attachLibraries(), $resource->attachLibraries());
static::assertEquals($enum->templateDirectory(), $resource->templateDirectory());
static::assertEquals($enum->cssDirectory(), $resource->cssDirectory());
static::assertEquals($enum->jsDirectory(), $resource->jsDirectory());
Expand Down
Loading