Skip to content

Commit

Permalink
ENH Add generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 11, 2024
1 parent 8a23514 commit 84d9a36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Extensions/CWPPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace CWP\AgencyExtensions\Extensions;

use PageController;
use SilverStripe\CMS\Controllers\ContentController;
use SilverStripe\Core\Extension;
use SilverStripe\SiteConfig\SiteConfig;

/**
* Class CWPPageExtension
*
* @property Page_Controller $owner
* @extends Extension<PageController>
*/
class CWPPageExtension extends Extension
{
Expand Down
4 changes: 3 additions & 1 deletion src/Extensions/CWPSiteConfigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
use SilverStripe\Forms\FileHandleField;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\View\Requirements;

/**
* Class CWPCleanupSiteConfigExtension
* @method File AppleTouchIcon114()
* @method File AppleTouchIcon144()
* @method File AppleTouchIcon57()
Expand All @@ -27,6 +27,8 @@
* @method Image FooterLogoSecondary()
* @method Image Logo()
* @method Image LogoRetina()
*
* @extends DataExtension<SiteConfig>
*/
class CWPSiteConfigExtension extends DataExtension
{
Expand Down
5 changes: 4 additions & 1 deletion src/Extensions/CarouselPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace CWP\AgencyExtensions\Extensions;

use CWP\AgencyExtensions\Model\CarouselItem;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Forms\FieldList;
Expand All @@ -19,6 +20,8 @@

/**
* @method SilverStripe\ORM\HasManyList<CarouselItem> CarouselItems()
*
* @extends DataExtension<SiteTree>
*/
class CarouselPageExtension extends DataExtension
{
Expand All @@ -35,7 +38,7 @@ class CarouselPageExtension extends DataExtension
];

/**
* @return DataList
* @return DataList<CarouselItem>
*/
public function getCarouselItems()
{
Expand Down

0 comments on commit 84d9a36

Please sign in to comment.