1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +01:00
phorge-phorge/src/applications/phid
Andre Klapper 25aebab655 Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string
Summary:
`::class` is available since PHP 5.5 (5.5 is a minimal requirement by Phorge): https://www.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class
It makes finding code using IDEs easier; see discussion in D25500.

Thus replace all string return values with returning the `::class` constant instead, with one exception: 'PhabricatorSettingApplication' in `PhabricatorUserPreferencesSearchEngine.php` does not exist and makes arc lint fail so this string remained unchanged.

Also note that two occurrences were wrapped in `pht()` for reasons I do not know.

List of functions whose return value get updated in this code change:
* getApplicationClassName()
* getAdapterApplicationClass()
* getDatasourceApplicationClass()
* getEditorApplicationClass()
* getEngineApplicationClass()
* getPHIDTypeApplicationClass()
* getQueryApplicationClass()

cf. T15158

Test Plan: Too broad - click around, basically.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15158

Differential Revision: https://we.phorge.it/D25524
2024-02-05 14:11:36 +01:00
..
conduit phtize all the things 2015-05-22 21:16:39 +10:00
handle Fix a PHP 8.1 strlen() issue with "mysql.pass" configuration 2021-12-16 15:24:21 -08:00
interface Work around a bug in PHP 5.3-ish with abstract methods in interfaces 2013-10-25 15:58:17 -07:00
query Make restricted objects in commit messages work more consistently with the web UI 2017-01-01 09:56:47 -08:00
remarkup Remarkup rule for rendering PHIDs as handles 2016-03-17 20:24:03 +00:00
resolver Fix spelling 2017-10-09 10:48:04 -07:00
storage Remove some unused properties 2015-06-17 20:41:52 +10:00
type Show more in Application Detail and List view 2023-11-21 11:22:23 -07:00
view Remove "State Icons" from handles 2019-10-31 12:04:43 -07:00
PhabricatorMetaMTAApplicationEmailPHIDType.php Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
PhabricatorObjectHandle.php Don't attempt to test capabilities on incomplete handles 2021-04-07 14:56:26 -07:00
PhabricatorPHIDConstants.php Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
utils.php Fix errors found by PHPStan 2017-02-17 10:10:15 +00:00