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
20 changes: 10 additions & 10 deletions docs/snippets/advanced-directive-array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<array_directive>

<user>
<name>Mr. Nathanael Davis</name>
<avatar>https://via.placeholder.com/640x480.png/0055ff?text=in</avatar>
<avatar>https://via.placeholder.com/640x480.png/001155?text=aperiam</avatar>
<images name="amet sint dolor">https://via.placeholder.com/640x480.png/00cc66?text=excepturi</images>
<images name="recusandae natus iure">https://via.placeholder.com/640x480.png/00cc99?text=velit</images>
<name>Karelle Watsica V</name>
<avatar>https://via.placeholder.com/640x480.png/00aaff?text=corrupti</avatar>
<avatar>https://via.placeholder.com/640x480.png/003344?text=tempore</avatar>
<images name="iste sed inventore">https://via.placeholder.com/640x480.png/008888?text=molestiae</images>
<images name="quis quod natus">https://via.placeholder.com/640x480.png/00aaee?text=reprehenderit</images>
</user>
<user>
<name>Ms. Elouise Deckow</name>
<avatar>https://via.placeholder.com/640x480.png/00bb66?text=voluptas</avatar>
<avatar>https://via.placeholder.com/640x480.png/00cc99?text=pariatur</avatar>
<images name="non autem reprehenderit">https://via.placeholder.com/640x480.png/009922?text=dolores</images>
<images name="voluptas corrupti fugiat">https://via.placeholder.com/640x480.png/005533?text=quae</images>
<name>Lucio Hessel</name>
<avatar>https://via.placeholder.com/640x480.png/0000aa?text=porro</avatar>
<avatar>https://via.placeholder.com/640x480.png/00dd33?text=totam</avatar>
<images name="officiis eos aliquid">https://via.placeholder.com/640x480.png/008811?text=aut</images>
<images name="quia repellat eaque">https://via.placeholder.com/640x480.png/0033dd?text=aut</images>
</user>

</array_directive>
5 changes: 5 additions & 0 deletions docs/snippets/advanced-directive-attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ public function item(Model $model): FeedItem
{
return new AttributesDirectiveFeedItem($model);
}

public function filename(): string
{
return '../../../../../../../../../docs/snippets/advanced-directive-attributes.xml';
}
}
10 changes: 5 additions & 5 deletions docs/snippets/advanced-directive-attributes.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<attributes_directive>

<company since="2013"/>
<company since="2004"/>
<url>https://example.com</url>

<user>
<name>Loren Shields</name>
<contact email="friesen.lewis@example.com" phone="555-000-1"/>
<name>Harry Lesch</name>
<contact email="amparo21@example.net" phone="555-000-1"/>
</user>
<user>
<name>Matilde Kohler DVM</name>
<contact email="casey.koch@example.net" phone="555-000-2"/>
<name>Lilla Mertz</name>
<contact email="luther32@example.net" phone="555-000-2"/>
</user>

</attributes_directive>
8 changes: 4 additions & 4 deletions docs/snippets/advanced-directive-cdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<cdata_directive>

<user>
<name><![CDATA[<h1>Haley Purdy</h1>]]></name>
<email>elmo56@example.com</email>
<name><![CDATA[<h1>Mrs. Aliza Douglas Sr.</h1>]]></name>
<email>rodriguez.marlon@example.net</email>
</user>
<user>
<name><![CDATA[<h1>Pearl Kozey</h1>]]></name>
<email>eusebio04@example.com</email>
<name><![CDATA[<h1>Leann Breitenberg DDS</h1>]]></name>
<email>fletcher.block@example.net</email>
</user>

</cdata_directive>
8 changes: 4 additions & 4 deletions docs/snippets/advanced-directive-mixed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<mixed_directive>

<user>
<name>Luis Beer DVM</name>
<name>Katrina Durgan</name>
<some>
<first>Foo</first>
<second>kane.nader@example.com</second>
<second>hubert33@example.net</second>
</some>
</user>
<user>
<name>Claud Quigley IV</name>
<name>Gerardo Oberbrunner</name>
<some>
<first>Foo</first>
<second>talon09@example.net</second>
<second>mohammad.krajcik@example.com</second>
</some>
</user>

Expand Down
8 changes: 4 additions & 4 deletions docs/snippets/advanced-directive-value.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<value_directive>

<user>
<name>Isac Hamill</name>
<contact type="email">mathias01@example.org</contact>
<name>Prof. Gilbert Rice</name>
<contact type="email">opredovic@example.org</contact>
</user>
<user>
<name>Letha Lubowitz</name>
<contact type="email">runolfsson.claude@example.org</contact>
<name>Ollie Crist</name>
<contact type="email">zelda21@example.com</contact>
</user>

</value_directive>
5 changes: 5 additions & 0 deletions docs/snippets/advanced-element-attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ public function item(Model $model): FeedItem
{
return new AttributeFeedItem($model);
}

public function filename(): string
{
return '../../../../../../../../../docs/snippets/advanced-element-attribute.xml';
}
}
8 changes: 4 additions & 4 deletions docs/snippets/advanced-element-attribute.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<attribute>

<user created_at="2025-09-04 20:11:33">
<user created_at="2025-09-04 20:31:51">
<id>1</id>
<name>Dr. Timmothy Howell MD</name>
<name>Dr. Dagmar Toy</name>
</user>
<user created_at="2025-09-04 20:11:33">
<user created_at="2025-09-04 20:31:51">
<id>2</id>
<name>Marcel Cummerata</name>
<name>Sister Block</name>
</user>

</attribute>
5 changes: 5 additions & 0 deletions docs/snippets/advanced-element-header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ public function footer(): string
{
return "\n<g:footer>This is a custom footer element</g:footer>";
}

public function filename(): string
{
return '../../../../../../../../../docs/snippets/advanced-element-header-footer.xml';
}
}
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-header-footer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

<user>
<id>1</id>
<name>Prof. Alberta Koch I</name>
<name>Dr. Janessa Senger MD</name>
</user>
<user>
<id>2</id>
<name>Judy Dietrich IV</name>
<name>Beth Koss IV</name>
</user>

</header_footer>
Expand Down
5 changes: 5 additions & 0 deletions docs/snippets/advanced-element-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ public function info(): FeedInfo
{
return new InfoMethodFeedInfo;
}

public function filename(): string
{
return '../../../../../../../../../docs/snippets/advanced-element-info.xml';
}
}
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<user>
<id>1</id>
<name>Miss Lina Nicolas</name>
<name>Tracy Halvorson Jr.</name>
</user>
<user>
<id>2</id>
<name>Dr. Jack Hagenes MD</name>
<name>Georgette Russel</name>
</user>

</info_method>
5 changes: 5 additions & 0 deletions docs/snippets/advanced-element-root.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ public function root(): ElementData
]
);
}

public function filename(): string
{
return '../../../../../../../../../docs/snippets/advanced-element-root.xml';
}
}
4 changes: 2 additions & 2 deletions docs/snippets/advanced-element-root.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

<user>
<id>1</id>
<name>Samantha Wilkinson</name>
<name>Miss Dawn Zemlak IV</name>
</user>
<user>
<id>2</id>
<name>Keyshawn Davis</name>
<name>Conner Mann</name>
</user>

</foo>
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<EmptyFeed>



</EmptyFeed>
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<EmptyFeed>



</EmptyFeed>
6 changes: 1 addition & 5 deletions tests/Helpers/docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use function Orchestra\Testbench\workbench_path;

function copyFeedFileToDoc(string $source, string $target, bool $removeFilename = true): void
function copyFeedFileToDoc(string $source, string $target): void
{
$sourceFile = workbench_path('app/Feeds/Docs/' . $source . '.php');
$targetFile = __DIR__ . '/../../docs/snippets/' . $target;
Expand All @@ -19,9 +19,5 @@ function copyFeedFileToDoc(string $source, string $target, bool $removeFilename
'App\Feeds',
], $content);

if ($removeFilename) {
$content = preg_replace('/(\n\s+public\sfunction\sfilename\(\):\sstring\n\s+{\n\s+.*\n\s+})/', '', $content);
}

file_put_contents($targetFile, $content);
}
6 changes: 1 addition & 5 deletions workbench/app/Feeds/EmptyFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use Illuminate\Database\Eloquent\Builder;
use Workbench\App\Models\News;

use function class_basename;

class EmptyFeed extends Feed
{
public function builder(): Builder
Expand All @@ -20,8 +18,6 @@ public function builder(): Builder

public function root(): ElementData
{
return new ElementData(
class_basename($this)
);
return new ElementData;
}
}