Skip to content

Commit

Permalink
Merge pull request #578 from hydephp/Remove-interface-ActionContract
Browse files Browse the repository at this point in the history
Remove interface ActionContract.php
  • Loading branch information
caendesilva authored Oct 25, 2022
2 parents 3112d25 + 8ab4780 commit d74bc19
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 28 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ If you however have written custom code that explicitly references the old names

### Removed
- Removed MetadataItemContract.php (use new abstract class BaseMetadataElement)
- Removed interface ActionContract.php

### Fixed
- for any bug fixes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Hyde\Framework\Actions\Constructors;

use Hyde\Framework\Contracts\ActionContract;
use Hyde\Framework\Hyde;
use Hyde\Framework\Models\Support\Image;
use Illuminate\Support\Facades\Http;
Expand All @@ -12,7 +11,7 @@
/**
* @see \Hyde\Framework\Testing\Feature\FindsContentLengthForImageObjectTest
*/
class FindsContentLengthForImageObject implements ActionContract
class FindsContentLengthForImageObject
{
protected Image $image;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Hyde\Framework\Actions;

use Hyde\Framework\Contracts\ActionContract;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\Extension\HeadingPermalink\HeadingPermalinkExtension;
Expand All @@ -14,7 +13,7 @@
*
* @see \Hyde\Framework\Testing\Feature\Actions\GeneratesSidebarTableOfContentsTest
*/
class GeneratesSidebarTableOfContents implements ActionContract
class GeneratesSidebarTableOfContents
{
protected string $markdown;

Expand Down
3 changes: 1 addition & 2 deletions packages/framework/src/Actions/PublishesHomepageView.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

namespace Hyde\Framework\Actions;

use Hyde\Framework\Contracts\ActionContract;
use Hyde\Framework\Hyde;

/**
* Publish one of the Hyde homepages.
*
* @see \Hyde\Framework\Testing\Feature\Actions\PublishesHomepageViewTest
*/
class PublishesHomepageView implements ActionContract
class PublishesHomepageView
{
public static array $homePages = [
'welcome' => [
Expand Down
3 changes: 1 addition & 2 deletions packages/framework/src/Actions/PublishesHydeViews.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Hyde\Framework\Actions;

use Hyde\Framework\Contracts\ActionContract;
use Hyde\Framework\Hyde;
use Illuminate\Support\Facades\File;

Expand All @@ -11,7 +10,7 @@
*
* @see \Hyde\Framework\Testing\Feature\Actions\PublishesHomepageViewTest
*/
class PublishesHydeViews implements ActionContract
class PublishesHydeViews
{
public static array $options = [
'layouts' => [
Expand Down
14 changes: 0 additions & 14 deletions packages/framework/src/Contracts/ActionContract.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Hyde\Framework\Testing\Feature\Actions;

use Hyde\Framework\Actions\PublishesHomepageView;
use Hyde\Framework\Contracts\ActionContract;
use Hyde\Framework\Hyde;
use Hyde\Testing\TestCase;

Expand All @@ -12,11 +11,6 @@
*/
class PublishesHomepageViewTest extends TestCase
{
public function test_implements_action_contract()
{
$this->assertInstanceOf(ActionContract::class, new PublishesHomepageView('foo'));
}

public function test_home_pages_array_contains_all_available_home_pages()
{
$array = PublishesHomepageView::$homePages;
Expand Down

0 comments on commit d74bc19

Please sign in to comment.