The expression $this->SubmittedForm()->canView($member); of type boolean|string adds the type string to the return on line 41 which is incompatible with the return type of the parent method SilverStripe\UserForms\M...ittedFormField::canView of type boolean.
The expression $this->SubmittedForm()->canEdit($member); of type boolean|string adds the type string to the return on line 55 which is incompatible with the return type of the parent method SilverStripe\UserForms\M...ittedFormField::canEdit of type boolean.
The expression $this->SubmittedForm()->canDelete($member); of type boolean|string adds the type string to the return on line 69 which is incompatible with the return type of the parent method SilverStripe\UserForms\M...tedFormField::canDelete of type boolean.
The property UploadedFileID does not exist on object<Firesphere\Partia...ialFileFieldSubmission>. Since you implemented __get, maybe consider adding a @property annotation.
Since your code implements the magic getter _get, this function will be called for any read access on an
undefined variable. You can add the @property annotation to your class or interface to document
the existence of this variable.
<?php/** * @property int $x * @property int $y * @property string $text */classMyLabel{private$properties;private$allowedProperties=array('x','y','text');publicfunction__get($name){if(isset($properties[$name])&&in_array($name,$this->allowedProperties)){return$properties[$name];}else{returnnull;}}publicfunction__set($name,$value){if(in_array($name,$this->allowedProperties)){$properties[$name]=$value;}else{thrownew\LogicException("Property $name is not defined.");}}}
If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
The method UploadedFile does not exist on object<Firesphere\Partia...ialFileFieldSubmission>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}