Page MenuHomePhorge

PhabricatorCustomField::readValueFromObject() should not return $this
Open, Needs TriagePublic

Description

PHPStan output:

------ ------------------------------------------------------------------------------------------------------------------- 
 https://we.phorge.it/source/phorge/browse/master/src/applications/drydock/customfield/DrydockBlueprintCoreCustomField.php               
 31     Method DrydockBlueprintCoreCustomField::readValueFromObject() should return this but return statement is missing.  
------ ------------------------------------------------------------------------------------------------------------------- 
------ ------------------------------------------------------------------------------------------------------------------------ 
 https://we.phorge.it/source/phorge/browse/master/src/applications/harbormaster/customfield/HarbormasterBuildStepCoreCustomField.php          
 61     Method HarbormasterBuildStepCoreCustomField::readValueFromObject() should return this but return statement is missing.  
------ ------------------------------------------------------------------------------------------------------------------------ 
------ ------------------------------------------------------------------------------------------------------------- 
 https://we.phorge.it/source/phorge/browse/master/src/applications/people/customfield/PhabricatorUserBlurbField.php                
 41     Method PhabricatorUserBlurbField::readValueFromObject() should return this but return statement is missing.  
------ ------------------------------------------------------------------------------------------------------------- 
------ ------------------------------------------------------------------------------------------------------------ 
 https://we.phorge.it/source/phorge/browse/master/src/applications/people/customfield/PhabricatorUserIconField.php                
 41     Method PhabricatorUserIconField::readValueFromObject() should return this but return statement is missing.  
------ ------------------------------------------------------------------------------------------------------------ 
------ ---------------------------------------------------------------------------------------------------------------- 
 https://we.phorge.it/source/phorge/browse/master/src/applications/people/customfield/PhabricatorUserRealNameField.php                
 41     Method PhabricatorUserRealNameField::readValueFromObject() should return this but return statement is missing.  
------ ---------------------------------------------------------------------------------------------------------------- 
------ ------------------------------------------------------------------------------------------------------------- 
 https://we.phorge.it/source/phorge/browse/master/src/applications/people/customfield/PhabricatorUserTitleField.php                
 41     Method PhabricatorUserTitleField::readValueFromObject() should return this but return statement is missing.  
------ ------------------------------------------------------------------------------------------------------------- 
------ --------------------------------------------------------------------------------------------------------------- 
 https://we.phorge.it/source/phorge/browse/master/src/applications/differential/customfield/DifferentialCoreCustomField.php          
 84     Method DifferentialCoreCustomField::readValueFromObject() should return this but return statement is missing.  
------ ---------------------------------------------------------------------------------------------------------------

These are all child or grandchild classes of PhabricatorCustomField.

https://we.phorge.it/source/phorge/browse/master/src/infrastructure/customfield/field/PhabricatorCustomField.php$440-452 returns $this.

But none of its in total seven child class implementations returns any value.
Thus I assume the method definition in parent PhabricatorCustomField is wrong.