1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 03:32:42 +01:00
phorge-phorge/src/applications/policy
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
..
__tests__ Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
application Allow different policy rules for different types of objects 2015-06-13 15:44:03 -07:00
capability Make "Can Interact" and logged-out users interact more gracefully 2017-03-09 08:50:57 -08:00
codex Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
config Remove product literal strings in "pht()", part 22 2022-04-25 16:46:26 -07:00
constants Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
controller Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
editor Give Phame blogs mutable interact policies 2022-04-01 12:52:56 -07:00
engineextension Allow *.search Conduit API methods to have data bulk-loaded by extensions 2016-07-31 11:15:18 -07:00
exception Modernize OAuthserver and provide more context on "no permission" exception 2015-09-03 10:05:23 -07:00
filter Initialize static variable to make linter happy 2023-11-13 08:52:00 +08:00
interface Require several advanced postgraduate degrees to understand object policies 2016-11-09 15:05:38 -08:00
management Improve help for "bin/policy unlock" to make it explicit that you can name objects with a PHID 2021-02-01 09:13:16 -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
rule Fix flaky subscribers policy rule unit test 2016-12-11 12:27:57 -08:00
storage Provide a simple "Attach File" explicit workflow for files referenced but not attached 2022-05-24 09:49:59 -07:00
view Inline custom policy rules inside policy capability explanation dialogs 2019-09-12 09:40:50 -07:00