1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-07 12:28:28 +01:00
phorge-phorge/src/applications/paste
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
..
application Show more in Application Detail and List view 2023-11-21 11:22:23 -07:00
capability Paste: Add edit policy 2014-12-31 08:24:57 -08:00
conduit Fix PHP 8.1 "strlen(null)" exception creating a Paste without content in Conduit paste.create 2023-08-18 09:48:41 +02:00
controller When a Paste has a useful alternative rendering in Files, provide a hint 2020-05-01 09:09:42 -07:00
editor Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
engine Add Ferret support to Paste 2020-04-16 14:10:23 -07:00
engineextension Give "owners.search" a "paths" attachment and a default "owners" value 2015-12-14 11:53:50 -08:00
lipsum Fix Lipsum generators for Differential Revisions and Pastes 2018-07-23 15:05:51 -05:00
mail Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
phid Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
query Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
remarkup Add some missing type hints 2015-05-05 07:33:00 +10:00
snippet Display paste line count alongside snippets 2017-01-26 19:06:23 -05:00
storage Add Ferret support to Paste 2020-04-16 14:10:23 -07:00
typeahead Make misc get*ApplicationClass[Name]() calls return ::class constant instead of string 2024-02-05 14:11:36 +01:00
view Return $this from setter methods 2015-07-06 22:53:43 +10:00
xaction Adjust paste content transaction to support earlier file PHID extraction 2022-05-19 13:21:03 -07:00