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 10, 2024
1 parent 46e07eb commit cd7a463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/AssetControlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@
* Assets which are no longer referenced will be flushed via explicit delete calls
* to the underlying filesystem.
*
* @property DataObject|Versioned $owner A {@see DataObject}, potentially decorated with {@see Versioned} extension.
* @extends DataExtension<DataObject&Versioned>
*/
class AssetControlExtension extends DataExtension
{

/**
* When archiving versioned dataobjects, should assets be archived with them?
* If false, assets will be deleted when the dataobject is archived.
Expand Down Expand Up @@ -266,7 +265,6 @@ protected function findAssets(DataObject $record)
*/
protected function isVersioned()
{
/** @var Versioned|DataObject $owner */
$owner = $this->owner;
return class_exists(Versioned::class)
&& $owner->hasExtension(Versioned::class)
Expand Down
2 changes: 1 addition & 1 deletion src/Shortcodes/FileLinkTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* Note that since both SiteTree and File are versioned, LinkTracking and FileTracking will
* only be enabled for the Stage record.
*
* @property DataObject|FileLinkTracking $owner
* @method SilverStripe\ORM\ManyManyThroughList<File> FileTracking()
* @extends DataExtension<DataObject&static>
*/
class FileLinkTracking extends DataExtension
{
Expand Down

0 comments on commit cd7a463

Please sign in to comment.