DOC Document nullable DataObject in used on table extension guide (#9755)

This commit is contained in:
Steve Boyd 2020-11-04 12:15:26 +13:00 committed by GitHub
parent e5a55a98d7
commit 4d0dc9176b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ class UsedOnTableExtension extends Extension
// This extension hook will alter a DataObject after it was fetched via MyDataObject::get() // This extension hook will alter a DataObject after it was fetched via MyDataObject::get()
// This allows a greater level of flexibility to exclude or modify individual DataObjects // This allows a greater level of flexibility to exclude or modify individual DataObjects
// It is less efficient to use this extension hook that `updateUsageExcludedClasses()` above // It is less efficient to use this extension hook that `updateUsageExcludedClasses()` above
public function updateUsageDataObject(DataObject $dataObject) public function updateUsageDataObject(?DataObject &$dataObject)
{ {
if (!($dataObject instanceof MyDataObject)) { if (!($dataObject instanceof MyDataObject)) {
return; return;