@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace some manual class name strings with ::class keyword

Summary:
Replace classname strings in `assert_instances_of()` call parameter with the corresponding `::class` keyword.
This will enable static code analysis to throw "Class not found" if such a class did not exist.

`::class` is available since PHP 5.5: https://www.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class
`::class` returns the fully qualified classname including namespace, however we do not use PHP namespaces except in imported external libraries.

See also similar rP25aebab6.

Refs T15158

Test Plan: Browse random Phorge pages?

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15158

Differential Revision: https://we.phorge.it/D26328

+1168 -301
+6 -1
src/applications/almanac/query/AlmanacDeviceSearchEngine.php
··· 93 93 return parent::buildSavedQueryFromBuiltin($query_key); 94 94 } 95 95 96 + /** 97 + * @param array<AlmanacDevice> $devices 98 + * @param PhabricatorSavedQuery $query 99 + * @param array<PhabricatorObjectHandle> $handles 100 + */ 96 101 protected function renderResultList( 97 102 array $devices, 98 103 PhabricatorSavedQuery $query, 99 104 array $handles) { 100 - assert_instances_of($devices, 'AlmanacDevice'); 105 + assert_instances_of($devices, AlmanacDevice::class); 101 106 102 107 $viewer = $this->requireViewer(); 103 108
+6 -1
src/applications/almanac/query/AlmanacNamespaceSearchEngine.php
··· 59 59 return parent::buildSavedQueryFromBuiltin($query_key); 60 60 } 61 61 62 + /** 63 + * @param array<AlmanacNamespace> $namespaces 64 + * @param PhabricatorSavedQuery $query 65 + * @param array<PhabricatorObjectHandle> $handles 66 + */ 62 67 protected function renderResultList( 63 68 array $namespaces, 64 69 PhabricatorSavedQuery $query, 65 70 array $handles) { 66 - assert_instances_of($namespaces, 'AlmanacNamespace'); 71 + assert_instances_of($namespaces, AlmanacNamespace::class); 67 72 68 73 $viewer = $this->requireViewer(); 69 74
+6 -1
src/applications/almanac/query/AlmanacNetworkSearchEngine.php
··· 59 59 return parent::buildSavedQueryFromBuiltin($query_key); 60 60 } 61 61 62 + /** 63 + * @param array<AlmanacNetwork> $networks 64 + * @param PhabricatorSavedQuery $query 65 + * @param array<PhabricatorObjectHandle> $handles 66 + */ 62 67 protected function renderResultList( 63 68 array $networks, 64 69 PhabricatorSavedQuery $query, 65 70 array $handles) { 66 - assert_instances_of($networks, 'AlmanacNetwork'); 71 + assert_instances_of($networks, AlmanacNetwork::class); 67 72 68 73 $viewer = $this->requireViewer(); 69 74
+6 -1
src/applications/almanac/query/AlmanacServiceSearchEngine.php
··· 86 86 return parent::buildSavedQueryFromBuiltin($query_key); 87 87 } 88 88 89 + /** 90 + * @param array<AlmanacService> $services 91 + * @param PhabricatorSavedQuery $query 92 + * @param array<PhabricatorObjectHandle> $handles 93 + */ 89 94 protected function renderResultList( 90 95 array $services, 91 96 PhabricatorSavedQuery $query, 92 97 array $handles) { 93 - assert_instances_of($services, 'AlmanacService'); 98 + assert_instances_of($services, AlmanacService::class); 94 99 95 100 $viewer = $this->requireViewer(); 96 101
+4 -1
src/applications/almanac/storage/AlmanacBinding.php
··· 98 98 /* -( AlmanacPropertyInterface )------------------------------------------- */ 99 99 100 100 101 + /** 102 + * @param array<AlmanacProperty> $properties 103 + */ 101 104 public function attachAlmanacProperties(array $properties) { 102 - assert_instances_of($properties, 'AlmanacProperty'); 105 + assert_instances_of($properties, AlmanacProperty::class); 103 106 $this->almanacProperties = mpull($properties, null, 'getFieldName'); 104 107 return $this; 105 108 }
+4 -1
src/applications/almanac/storage/AlmanacDevice.php
··· 119 119 /* -( AlmanacPropertyInterface )------------------------------------------- */ 120 120 121 121 122 + /** 123 + * @param array<AlmanacProperty> $properties 124 + */ 122 125 public function attachAlmanacProperties(array $properties) { 123 - assert_instances_of($properties, 'AlmanacProperty'); 126 + assert_instances_of($properties, AlmanacProperty::class); 124 127 $this->almanacProperties = mpull($properties, null, 'getFieldName'); 125 128 return $this; 126 129 }
+4 -1
src/applications/almanac/storage/AlmanacService.php
··· 133 133 /* -( AlmanacPropertyInterface )------------------------------------------- */ 134 134 135 135 136 + /** 137 + * @param array<AlmanacProperty> $properties 138 + */ 136 139 public function attachAlmanacProperties(array $properties) { 137 - assert_instances_of($properties, 'AlmanacProperty'); 140 + assert_instances_of($properties, AlmanacProperty::class); 138 141 $this->almanacProperties = mpull($properties, null, 'getFieldName'); 139 142 return $this; 140 143 }
+6 -1
src/applications/audit/query/PhabricatorCommitSearchEngine.php
··· 222 222 return parent::buildSavedQueryFromBuiltin($query_key); 223 223 } 224 224 225 + /** 226 + * @param array<PhabricatorRepositoryCommit> $commits 227 + * @param PhabricatorSavedQuery $query 228 + * @param array<PhabricatorObjectHandle> $handles 229 + */ 225 230 protected function renderResultList( 226 231 array $commits, 227 232 PhabricatorSavedQuery $query, 228 233 array $handles) { 229 - assert_instances_of($commits, 'PhabricatorRepositoryCommit'); 234 + assert_instances_of($commits, PhabricatorRepositoryCommit::class); 230 235 $viewer = $this->requireViewer(); 231 236 232 237 $bucket = $this->getResultBucket($query);
+1 -1
src/applications/auth/adapter/PhutilAuthAdapter.php
··· 19 19 20 20 final public function getAccountIdentifiers() { 21 21 $result = $this->newAccountIdentifiers(); 22 - assert_instances_of($result, 'PhabricatorExternalAccountIdentifier'); 22 + assert_instances_of($result, PhabricatorExternalAccountIdentifier::class); 23 23 return $result; 24 24 } 25 25
+4 -1
src/applications/auth/controller/PhabricatorAuthStartController.php
··· 298 298 ->setURI($auto_uri); 299 299 } 300 300 301 + /** 302 + * @param array<PhabricatorAuthProviderConfig> $configs 303 + */ 301 304 private function newEmailLoginView(array $configs) { 302 - assert_instances_of($configs, 'PhabricatorAuthProviderConfig'); 305 + assert_instances_of($configs, PhabricatorAuthProviderConfig::class); 303 306 304 307 // Check if password auth is enabled. If it is, the password login form 305 308 // renders a "Forgot password?" link, so we don't need to provide a
+5 -1
src/applications/auth/engine/PhabricatorAuthPasswordEngine.php
··· 339 339 return $matches; 340 340 } 341 341 342 + /** 343 + * @param PhutilOpaqueEnvelope $envelope 344 + * @param array<PhabricatorAuthPassword> $passwords 345 + */ 342 346 private function upgradeHashers( 343 347 PhutilOpaqueEnvelope $envelope, 344 348 array $passwords) { 345 349 346 - assert_instances_of($passwords, 'PhabricatorAuthPassword'); 350 + assert_instances_of($passwords, PhabricatorAuthPassword::class); 347 351 348 352 $need_upgrade = array(); 349 353 foreach ($passwords as $password) {
+4 -2
src/applications/auth/engine/PhabricatorAuthSessionEngine.php
··· 739 739 * Render a form for providing relevant multi-factor credentials. 740 740 * 741 741 * @param array $factors 742 - * @param array $validation_results 742 + * @param array<PhabricatorAuthFactorResult> $validation_results 743 743 * @param PhabricatorUser $viewer Viewing user. 744 744 * @param AphrontRequest $request Current request. 745 745 * @return AphrontFormView Renderable form. ··· 750 750 array $validation_results, 751 751 PhabricatorUser $viewer, 752 752 AphrontRequest $request) { 753 - assert_instances_of($validation_results, 'PhabricatorAuthFactorResult'); 753 + assert_instances_of( 754 + $validation_results, 755 + PhabricatorAuthFactorResult::class); 754 756 755 757 $form = id(new AphrontFormView()) 756 758 ->setUser($viewer)
+8 -2
src/applications/auth/exception/PhabricatorAuthHighSecurityRequiredException.php
··· 7 7 private $factorValidationResults; 8 8 private $isSessionUpgrade; 9 9 10 + /** 11 + * @param array<PhabricatorAuthFactorResult> $results 12 + */ 10 13 public function setFactorValidationResults(array $results) { 11 - assert_instances_of($results, 'PhabricatorAuthFactorResult'); 14 + assert_instances_of($results, PhabricatorAuthFactorResult::class); 12 15 $this->factorValidationResults = $results; 13 16 return $this; 14 17 } ··· 17 20 return $this->factorValidationResults; 18 21 } 19 22 23 + /** 24 + * @param array<PhabricatorAuthFactorConfig> $factors 25 + */ 20 26 public function setFactors(array $factors) { 21 - assert_instances_of($factors, 'PhabricatorAuthFactorConfig'); 27 + assert_instances_of($factors, PhabricatorAuthFactorConfig::class); 22 28 $this->factors = $factors; 23 29 return $this; 24 30 }
+27 -5
src/applications/auth/factor/PhabricatorAuthFactor.php
··· 139 139 PhabricatorAuthFactorConfig $config, 140 140 AphrontRequest $response); 141 141 142 + /** 143 + * @param PhabricatorAuthFactorConfig $config 144 + * @param PhabricatorUser $viewer 145 + * @param array<PhabricatorAuthChallenge> $challenges 146 + */ 142 147 final public function getNewIssuedChallenges( 143 148 PhabricatorAuthFactorConfig $config, 144 149 PhabricatorUser $viewer, 145 150 array $challenges) { 146 - assert_instances_of($challenges, 'PhabricatorAuthChallenge'); 151 + assert_instances_of($challenges, PhabricatorAuthChallenge::class); 147 152 148 153 $now = PhabricatorTime::getNow(); 149 154 ··· 161 166 return $new_challenges; 162 167 } 163 168 164 - assert_instances_of($new_challenges, 'PhabricatorAuthChallenge'); 169 + assert_instances_of($new_challenges, PhabricatorAuthChallenge::class); 165 170 166 171 foreach ($new_challenges as $new_challenge) { 167 172 $ttl = $new_challenge->getChallengeTTL(); ··· 194 199 PhabricatorUser $viewer, 195 200 array $challenges); 196 201 202 + /** 203 + * @param PhabricatorAuthFactorConfig $config 204 + * @param PhabricatorUser $viewer 205 + * @param array<PhabricatorAuthChallenge> $challenges 206 + */ 197 207 final public function getResultFromIssuedChallenges( 198 208 PhabricatorAuthFactorConfig $config, 199 209 PhabricatorUser $viewer, 200 210 array $challenges) { 201 - assert_instances_of($challenges, 'PhabricatorAuthChallenge'); 211 + assert_instances_of($challenges, PhabricatorAuthChallenge::class); 202 212 203 213 $result = $this->newResultFromIssuedChallenges( 204 214 $config, ··· 221 231 return $result; 222 232 } 223 233 234 + /** 235 + * @param PhabricatorAuthFactorConfig $config 236 + * @param PhabricatorUser $viewer 237 + * @param AphrontRequest $request 238 + * @param array<PhabricatorAuthChallenge> $challenges 239 + */ 224 240 final public function getResultForPrompt( 225 241 PhabricatorAuthFactorConfig $config, 226 242 PhabricatorUser $viewer, 227 243 AphrontRequest $request, 228 244 array $challenges) { 229 - assert_instances_of($challenges, 'PhabricatorAuthChallenge'); 245 + assert_instances_of($challenges, PhabricatorAuthChallenge::class); 230 246 231 247 $result = $this->newResultForPrompt( 232 248 $config, ··· 260 276 PhabricatorUser $viewer, 261 277 array $challenges); 262 278 279 + /** 280 + * @param PhabricatorAuthFactorConfig $config 281 + * @param PhabricatorUser $viewer 282 + * @param AphrontRequest $request 283 + * @param array<PhabricatorAuthChallenge> $challenges 284 + */ 263 285 final public function getResultFromChallengeResponse( 264 286 PhabricatorAuthFactorConfig $config, 265 287 PhabricatorUser $viewer, 266 288 AphrontRequest $request, 267 289 array $challenges) { 268 - assert_instances_of($challenges, 'PhabricatorAuthChallenge'); 290 + assert_instances_of($challenges, PhabricatorAuthChallenge::class); 269 291 270 292 $result = $this->newResultFromChallengeResponse( 271 293 $config,
+5 -1
src/applications/auth/provider/PhabricatorAuthProvider.php
··· 196 196 return; 197 197 } 198 198 199 + /** 200 + * @param array<PhabricatorExternalAccountIdentifier> $identifiers 201 + */ 199 202 final protected function newExternalAccountForIdentifiers( 200 203 array $identifiers) { 201 204 202 - assert_instances_of($identifiers, 'PhabricatorExternalAccountIdentifier'); 205 + assert_instances_of($identifiers, 206 + PhabricatorExternalAccountIdentifier::class); 203 207 204 208 if (!$identifiers) { 205 209 throw new Exception(
+6 -1
src/applications/auth/query/PhabricatorAuthInviteSearchEngine.php
··· 70 70 return array_keys($phids); 71 71 } 72 72 73 + /** 74 + * @param array<PhabricatorAuthInvite> $invites 75 + * @param PhabricatorSavedQuery $query 76 + * @param array<PhabricatorObjectHandle> $handles 77 + */ 73 78 protected function renderResultList( 74 79 array $invites, 75 80 PhabricatorSavedQuery $query, 76 81 array $handles) { 77 - assert_instances_of($invites, 'PhabricatorAuthInvite'); 82 + assert_instances_of($invites, PhabricatorAuthInvite::class); 78 83 79 84 $viewer = $this->requireViewer(); 80 85
+4 -1
src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
··· 35 35 return $this; 36 36 } 37 37 38 + /** 39 + * @param array<PhabricatorAuthSSHPublicKey> $keys 40 + */ 38 41 public function withKeys(array $keys) { 39 - assert_instances_of($keys, 'PhabricatorAuthSSHPublicKey'); 42 + assert_instances_of($keys, PhabricatorAuthSSHPublicKey::class); 40 43 $this->keys = $keys; 41 44 return $this; 42 45 }
+6 -1
src/applications/auth/query/PhabricatorAuthSSHKeySearchEngine.php
··· 73 73 return parent::buildSavedQueryFromBuiltin($query_key); 74 74 } 75 75 76 + /** 77 + * @param array<PhabricatorAuthSSHKey> $keys 78 + * @param PhabricatorSavedQuery $query 79 + * @param array<PhabricatorObjectHandle> $handles 80 + */ 76 81 protected function renderResultList( 77 82 array $keys, 78 83 PhabricatorSavedQuery $query, 79 84 array $handles) { 80 - assert_instances_of($keys, 'PhabricatorAuthSSHKey'); 85 + assert_instances_of($keys, PhabricatorAuthSSHKey::class); 81 86 82 87 $viewer = $this->requireViewer(); 83 88
+4 -1
src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php
··· 80 80 return $this; 81 81 } 82 82 83 + /** 84 + * @param array<PhabricatorAuthSSHKey> $keys 85 + */ 83 86 public function setKeys(array $keys) { 84 - assert_instances_of($keys, 'PhabricatorAuthSSHKey'); 87 + assert_instances_of($keys, PhabricatorAuthSSHKey::class); 85 88 $this->keys = $keys; 86 89 return $this; 87 90 }
+6 -1
src/applications/badges/query/PhabricatorBadgesSearchEngine.php
··· 93 93 return $phids; 94 94 } 95 95 96 + /** 97 + * @param array<PhabricatorBadgesBadge> $badges 98 + * @param PhabricatorSavedQuery $query 99 + * @param array<PhabricatorObjectHandle> $handles 100 + */ 96 101 protected function renderResultList( 97 102 array $badges, 98 103 PhabricatorSavedQuery $query, 99 104 array $handles) { 100 - assert_instances_of($badges, 'PhabricatorBadgesBadge'); 105 + assert_instances_of($badges, PhabricatorBadgesBadge::class); 101 106 102 107 $viewer = $this->requireViewer(); 103 108
+14 -2
src/applications/conduit/controller/PhabricatorConduitConsoleController.php
··· 126 126 ->appendChild($view); 127 127 } 128 128 129 + /** 130 + * @param ConduitAPIMethod $method 131 + * @param array<ConduitAPIDocumentationPage> $documentation_pages 132 + */ 129 133 private function newDocumentationView( 130 134 ConduitAPIMethod $method, 131 135 array $documentation_pages) { 132 - assert_instances_of($documentation_pages, 'ConduitAPIDocumentationPage'); 136 + assert_instances_of( 137 + $documentation_pages, 138 + ConduitAPIDocumentationPage::class); 133 139 134 140 $viewer = $this->getViewer(); 135 141 ··· 153 159 return $view; 154 160 } 155 161 162 + /** 163 + * @param ConduitAPIMethod $method 164 + * @param array<ConduitAPIDocumentationPage> $documentation_pages 165 + */ 156 166 private function newNavigationView( 157 167 ConduitAPIMethod $method, 158 168 array $documentation_pages) { 159 - assert_instances_of($documentation_pages, 'ConduitAPIDocumentationPage'); 169 + assert_instances_of( 170 + $documentation_pages, 171 + ConduitAPIDocumentationPage::class); 160 172 161 173 $console_uri = urisprintf( 162 174 '/method/%s/',
+6 -1
src/applications/conduit/query/PhabricatorConduitLogSearchEngine.php
··· 174 174 return $export; 175 175 } 176 176 177 + /** 178 + * @param array<PhabricatorConduitMethodCallLog> $logs 179 + * @param PhabricatorSavedQuery $query 180 + * @param array<PhabricatorObjectHandle> $handles 181 + */ 177 182 protected function renderResultList( 178 183 array $logs, 179 184 PhabricatorSavedQuery $query, 180 185 array $handles) { 181 - assert_instances_of($logs, 'PhabricatorConduitMethodCallLog'); 186 + assert_instances_of($logs, PhabricatorConduitMethodCallLog::class); 182 187 $viewer = $this->requireViewer(); 183 188 184 189 $methods = id(new PhabricatorConduitMethodQuery())
+6 -1
src/applications/conduit/query/PhabricatorConduitSearchEngine.php
··· 122 122 return parent::buildSavedQueryFromBuiltin($query_key); 123 123 } 124 124 125 + /** 126 + * @param array<ConduitAPIMethod> $methods 127 + * @param PhabricatorSavedQuery $query 128 + * @param array<PhabricatorObjectHandle> $handles 129 + */ 125 130 protected function renderResultList( 126 131 array $methods, 127 132 PhabricatorSavedQuery $query, 128 133 array $handles) { 129 - assert_instances_of($methods, 'ConduitAPIMethod'); 134 + assert_instances_of($methods, ConduitAPIMethod::class); 130 135 131 136 $viewer = $this->requireViewer(); 132 137
+4 -1
src/applications/config/check/PhabricatorSetupCheck.php
··· 131 131 } 132 132 } 133 133 134 + /** 135 + * @param array<PhabricatorSetupIssue> $all_issues 136 + */ 134 137 final public static function getUnignoredIssueKeys(array $all_issues) { 135 - assert_instances_of($all_issues, 'PhabricatorSetupIssue'); 138 + assert_instances_of($all_issues, PhabricatorSetupIssue::class); 136 139 $keys = array(); 137 140 foreach ($all_issues as $issue) { 138 141 if (!$issue->getIsIgnored()) {
+6 -1
src/applications/config/controller/issue/PhabricatorConfigIssueListController.php
··· 67 67 ->appendChild($content); 68 68 } 69 69 70 + /** 71 + * @param array<PhabricatorSetupIssue> $issues 72 + * @param string $group 73 + * @param string $fonticon FontAwesome icon name 74 + */ 70 75 private function buildIssueList(array $issues, $group, $fonticon) { 71 - assert_instances_of($issues, 'PhabricatorSetupIssue'); 76 + assert_instances_of($issues, PhabricatorSetupIssue::class); 72 77 $list = new PHUIObjectItemListView(); 73 78 $list->setBig(true); 74 79 $ignored_items = array();
+4 -1
src/applications/config/view/PhabricatorHTTPParameterTypeTableView.php
··· 5 5 6 6 private $types; 7 7 8 + /** 9 + * @param array<AphrontHTTPParameterType> $types 10 + */ 8 11 public function setHTTPParameterTypes(array $types) { 9 - assert_instances_of($types, 'AphrontHTTPParameterType'); 12 + assert_instances_of($types, AphrontHTTPParameterType::class); 10 13 $this->types = $types; 11 14 return $this; 12 15 }
+6 -1
src/applications/conpherence/query/ConpherenceThreadSearchEngine.php
··· 91 91 return parent::buildSavedQueryFromBuiltin($query_key); 92 92 } 93 93 94 + /** 95 + * @param array<ConpherenceThread> $conpherences 96 + * @param PhabricatorSavedQuery $query 97 + * @param array<PhabricatorObjectHandle> $handles 98 + */ 94 99 protected function renderResultList( 95 100 array $conpherences, 96 101 PhabricatorSavedQuery $query, 97 102 array $handles) { 98 - assert_instances_of($conpherences, 'ConpherenceThread'); 103 + assert_instances_of($conpherences, ConpherenceThread::class); 99 104 100 105 $viewer = $this->requireViewer(); 101 106
+16 -4
src/applications/conpherence/storage/ConpherenceThread.php
··· 76 76 return '/'.$this->getMonogram(); 77 77 } 78 78 79 + /** 80 + * @param array<ConpherenceParticipant> $participants 81 + */ 79 82 public function attachParticipants(array $participants) { 80 - assert_instances_of($participants, 'ConpherenceParticipant'); 83 + assert_instances_of($participants, ConpherenceParticipant::class); 81 84 $this->participants = $participants; 82 85 return $this; 83 86 } ··· 101 104 return array_keys($participants); 102 105 } 103 106 107 + /** 108 + * @param array<PhabricatorObjectHandle> $handles 109 + */ 104 110 public function attachHandles(array $handles) { 105 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 111 + assert_instances_of($handles, PhabricatorObjectHandle::class); 106 112 $this->handles = $handles; 107 113 return $this; 108 114 } ··· 111 117 return $this->assertAttached($this->handles); 112 118 } 113 119 120 + /** 121 + * @param array<ConpherenceTransaction> $transactions 122 + */ 114 123 public function attachTransactions(array $transactions) { 115 - assert_instances_of($transactions, 'ConpherenceTransaction'); 124 + assert_instances_of($transactions, ConpherenceTransaction::class); 116 125 $this->transactions = $transactions; 117 126 return $this; 118 127 } ··· 295 304 return $policy_objects; 296 305 } 297 306 307 + /** 308 + * @param array<PhabricatorPolicy> $policy_objects 309 + */ 298 310 public function getPolicyIconName(array $policy_objects) { 299 - assert_instances_of($policy_objects, 'PhabricatorPolicy'); 311 + assert_instances_of($policy_objects, PhabricatorPolicy::class); 300 312 301 313 $icon = $policy_objects[$this->getViewPolicy()]->getIcon(); 302 314 return $icon;
+12 -3
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 12 12 private $policyObjects; 13 13 private $quicksandConfig = array(); 14 14 15 + /** 16 + * @param array<ConpherenceThread> $conpherences 17 + */ 15 18 public function setConpherences(array $conpherences) { 16 - assert_instances_of($conpherences, 'ConpherenceThread'); 19 + assert_instances_of($conpherences, ConpherenceThread::class); 17 20 $this->conpherences = $conpherences; 18 21 return $this; 19 22 } ··· 41 44 return $this->selectedConpherence; 42 45 } 43 46 47 + /** 48 + * @param array<ConpherenceThread> $transactions 49 + */ 44 50 public function setTransactions(array $transactions) { 45 - assert_instances_of($transactions, 'ConpherenceTransaction'); 51 + assert_instances_of($transactions, ConpherenceTransaction::class); 46 52 $this->transactions = $transactions; 47 53 return $this; 48 54 } ··· 78 84 return $this->initialLoad; 79 85 } 80 86 87 + /** 88 + * @param array<PhabricatorPolicy> $objects 89 + */ 81 90 public function setPolicyObjects(array $objects) { 82 - assert_instances_of($objects, 'PhabricatorPolicy'); 91 + assert_instances_of($objects, PhabricatorPolicy::class); 83 92 84 93 $this->policyObjects = $objects; 85 94 return $this;
+4 -1
src/applications/conpherence/view/ConpherenceThreadListView.php
··· 7 7 private $baseURI; 8 8 private $threads; 9 9 10 + /** 11 + * @param array<ConpherenceThread> $threads 12 + */ 10 13 public function setThreads(array $threads) { 11 - assert_instances_of($threads, 'ConpherenceThread'); 14 + assert_instances_of($threads, ConpherenceThread::class); 12 15 $this->threads = $threads; 13 16 return $this; 14 17 }
+4 -1
src/applications/conpherence/view/ConpherenceTransactionView.php
··· 28 28 return $this->conpherenceTransaction; 29 29 } 30 30 31 + /** 32 + * @param array<PhabricatorObjectHandle> $handles 33 + */ 31 34 public function setHandles(array $handles) { 32 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 35 + assert_instances_of($handles, PhabricatorObjectHandle::class); 33 36 $this->handles = $handles; 34 37 return $this; 35 38 }
+6 -1
src/applications/countdown/query/PhabricatorCountdownSearchEngine.php
··· 86 86 return mpull($countdowns, 'getAuthorPHID'); 87 87 } 88 88 89 + /** 90 + * @param array<PhabricatorCountdown> $countdowns 91 + * @param PhabricatorSavedQuery $query 92 + * @param array<PhabricatorObjectHandle> $handles 93 + */ 89 94 protected function renderResultList( 90 95 array $countdowns, 91 96 PhabricatorSavedQuery $query, 92 97 array $handles) { 93 98 94 - assert_instances_of($countdowns, 'PhabricatorCountdown'); 99 + assert_instances_of($countdowns, PhabricatorCountdown::class); 95 100 96 101 $viewer = $this->requireViewer(); 97 102
+4 -1
src/applications/daemon/view/PhabricatorDaemonLogListView.php
··· 4 4 5 5 private $daemonLogs; 6 6 7 + /** 8 + * @param array<PhabricatorDaemonLog> $daemon_logs 9 + */ 7 10 public function setDaemonLogs(array $daemon_logs) { 8 - assert_instances_of($daemon_logs, 'PhabricatorDaemonLog'); 11 + assert_instances_of($daemon_logs, PhabricatorDaemonLog::class); 9 12 $this->daemonLogs = $daemon_logs; 10 13 return $this; 11 14 }
+4 -1
src/applications/dashboard/layoutconfig/PhabricatorDashboardColumn.php
··· 25 25 return $this->classes; 26 26 } 27 27 28 + /** 29 + * @param array<PhabricatorDashboardPanelRef> $refs 30 + */ 28 31 public function setPanelRefs(array $refs) { 29 - assert_instances_of($refs, 'PhabricatorDashboardPanelRef'); 32 + assert_instances_of($refs, PhabricatorDashboardPanelRef::class); 30 33 $this->refs = $refs; 31 34 return $this; 32 35 }
+6 -1
src/applications/dashboard/query/PhabricatorDashboardPortalSearchEngine.php
··· 49 49 return parent::buildSavedQueryFromBuiltin($query_key); 50 50 } 51 51 52 + /** 53 + * @param array<PhabricatorDashboardPortal> $portals 54 + * @param PhabricatorSavedQuery $query 55 + * @param array<PhabricatorObjectHandle> $handles 56 + */ 52 57 protected function renderResultList( 53 58 array $portals, 54 59 PhabricatorSavedQuery $query, 55 60 array $handles) { 56 61 57 - assert_instances_of($portals, 'PhabricatorDashboardPortal'); 62 + assert_instances_of($portals, PhabricatorDashboardPortal::class); 58 63 59 64 $viewer = $this->requireViewer(); 60 65
+4 -1
src/applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php
··· 119 119 return $tag_names; 120 120 } 121 121 122 + /** 123 + * @param array<DiffusionRepositoryTag> $tags 124 + */ 122 125 private function loadMessagesForTags(array $tags) { 123 - assert_instances_of($tags, 'DiffusionRepositoryTag'); 126 + assert_instances_of($tags, DiffusionRepositoryTag::class); 124 127 125 128 $drequest = $this->getDiffusionRequest(); 126 129 $repository = $drequest->getRepository();
+7 -1
src/applications/diffusion/controller/DiffusionCommitController.php
··· 898 898 return $file->getRedirectResponse(); 899 899 } 900 900 901 + /** 902 + * @param PhabricatorRepositoryCommit $commit 903 + * @param array<PhabricatorRepositoryAuditRequest> $audit_requests 904 + */ 901 905 private function renderAuditStatusView( 902 906 PhabricatorRepositoryCommit $commit, 903 907 array $audit_requests) { 904 - assert_instances_of($audit_requests, 'PhabricatorRepositoryAuditRequest'); 908 + assert_instances_of( 909 + $audit_requests, 910 + PhabricatorRepositoryAuditRequest::class); 905 911 $viewer = $this->getViewer(); 906 912 907 913 $view = new PHUIStatusListView();
+3 -1
src/applications/diffusion/controller/DiffusionSymbolController.php
··· 99 99 } 100 100 101 101 try { 102 - assert_instances_of($source_results, 'PhabricatorRepositorySymbol'); 102 + assert_instances_of( 103 + $source_results, 104 + PhabricatorRepositorySymbol::class); 103 105 } catch (InvalidArgumentException $ex) { 104 106 throw new Exception( 105 107 pht(
+4 -1
src/applications/diffusion/data/DiffusionBrowseResultSet.php
··· 16 16 private $existedAtCommit; 17 17 private $deletedAtCommit; 18 18 19 + /** 20 + * @param array<DiffusionRepositoryPath> $paths 21 + */ 19 22 public function setPaths(array $paths) { 20 - assert_instances_of($paths, 'DiffusionRepositoryPath'); 23 + assert_instances_of($paths, DiffusionRepositoryPath::class); 21 24 $this->paths = $paths; 22 25 return $this; 23 26 }
+4 -1
src/applications/diffusion/data/DiffusionCommitRef.php
··· 50 50 ->setHashes($hashes); 51 51 } 52 52 53 + /** 54 + * @param array<DiffusionCommitHash> $hashes 55 + */ 53 56 public function setHashes(array $hashes) { 54 - assert_instances_of($hashes, 'DiffusionCommitHash'); 57 + assert_instances_of($hashes, DiffusionCommitHash::class); 55 58 $this->hashes = $hashes; 56 59 return $this; 57 60 }
+16 -6
src/applications/diffusion/engine/DiffusionCommitHookEngine.php
··· 267 267 } 268 268 } 269 269 270 + /** 271 + * @param array<PhabricatorRepositoryPushLog> $ref_updates 272 + */ 270 273 private function rejectDangerousChanges(array $ref_updates) { 271 - assert_instances_of($ref_updates, 'PhabricatorRepositoryPushLog'); 274 + assert_instances_of($ref_updates, PhabricatorRepositoryPushLog::class); 272 275 273 276 $repository = $this->getRepository(); 274 277 if ($repository->shouldAllowDangerousChanges()) { ··· 296 299 } 297 300 } 298 301 302 + /** 303 + * @param array<PhabricatorRepositoryPushLog> $ref_updates 304 + */ 299 305 private function findContentUpdates(array $ref_updates) { 300 - assert_instances_of($ref_updates, 'PhabricatorRepositoryPushLog'); 306 + assert_instances_of($ref_updates, PhabricatorRepositoryPushLog::class); 301 307 302 308 $type = $this->getRepository()->getVersionControlSystem(); 303 309 switch ($type) { ··· 471 477 return $ref_updates; 472 478 } 473 479 474 - 480 + /** 481 + * @param array<PhabricatorRepositoryPushLog> $ref_updates 482 + */ 475 483 private function findGitMergeBases(array $ref_updates) { 476 - assert_instances_of($ref_updates, 'PhabricatorRepositoryPushLog'); 484 + assert_instances_of($ref_updates, PhabricatorRepositoryPushLog::class); 477 485 478 486 $futures = array(); 479 487 foreach ($ref_updates as $key => $ref_update) { ··· 522 530 return $ref_updates; 523 531 } 524 532 525 - 533 + /** 534 + * @param array<PhabricatorRepositoryPushLog> $ref_updates 535 + */ 526 536 private function findGitChangeFlags(array $ref_updates) { 527 - assert_instances_of($ref_updates, 'PhabricatorRepositoryPushLog'); 537 + assert_instances_of($ref_updates, PhabricatorRepositoryPushLog::class); 528 538 529 539 foreach ($ref_updates as $key => $ref_update) { 530 540 $ref_old = $ref_update->getRefOld();
+4 -1
src/applications/diffusion/query/DiffusionCommitHintQuery.php
··· 28 28 return $this; 29 29 } 30 30 31 + /** 32 + * @param array<PhabricatorRepositoryCommit> $commits 33 + */ 31 34 public function withCommits(array $commits) { 32 - assert_instances_of($commits, 'PhabricatorRepositoryCommit'); 35 + assert_instances_of($commits, PhabricatorRepositoryCommit::class); 33 36 34 37 $repository_phids = array(); 35 38 foreach ($commits as $commit) {
+4 -1
src/applications/diffusion/query/DiffusionCommitQuery.php
··· 126 126 return $this; 127 127 } 128 128 129 + /** 130 + * @param array<PhabricatorUser> $users 131 + */ 129 132 public function needAuditAuthority(array $users) { 130 - assert_instances_of($users, 'PhabricatorUser'); 133 + assert_instances_of($users, PhabricatorUser::class); 131 134 $this->needAuditAuthority = $users; 132 135 return $this; 133 136 }
+5 -1
src/applications/diffusion/query/DiffusionCommitRevisionQuery.php
··· 3 3 final class DiffusionCommitRevisionQuery 4 4 extends Phobject { 5 5 6 + /** 7 + * @param PhabricatorUser $viewer 8 + * @param array<PhabricatorRepositoryCommit> $commits 9 + */ 6 10 public static function loadRevisionMapForCommits( 7 11 PhabricatorUser $viewer, 8 12 array $commits) { 9 - assert_instances_of($commits, 'PhabricatorRepositoryCommit'); 13 + assert_instances_of($commits, PhabricatorRepositoryCommit::class); 10 14 11 15 if (!$commits) { 12 16 return array();
+6 -1
src/applications/diffusion/query/DiffusionRepositoryIdentitySearchEngine.php
··· 96 96 return parent::buildSavedQueryFromBuiltin($query_key); 97 97 } 98 98 99 + /** 100 + * @param array<PhabricatorRepositoryIdentity> $identities 101 + * @param PhabricatorSavedQuery $query 102 + * @param array<PhabricatorObjectHandle> $handles 103 + */ 99 104 protected function renderResultList( 100 105 array $identities, 101 106 PhabricatorSavedQuery $query, 102 107 array $handles) { 103 - assert_instances_of($identities, 'PhabricatorRepositoryIdentity'); 108 + assert_instances_of($identities, PhabricatorRepositoryIdentity::class); 104 109 105 110 $viewer = $this->requireViewer(); 106 111
+4 -3
src/applications/diffusion/query/DiffusionSymbolQuery.php
··· 242 242 243 243 244 244 /** 245 + * @param array<PhabricatorRepositorySymbol> $symbols 245 246 * @task internal 246 247 */ 247 248 private function loadPaths(array $symbols) { 248 - assert_instances_of($symbols, 'PhabricatorRepositorySymbol'); 249 + assert_instances_of($symbols, PhabricatorRepositorySymbol::class); 249 250 $path_map = queryfx_all( 250 251 id(new PhabricatorRepository())->establishConnection('r'), 251 252 'SELECT * FROM %T WHERE id IN (%Ld)', ··· 257 258 } 258 259 } 259 260 260 - 261 261 /** 262 + * @param array<PhabricatorRepositorySymbol> $symbols 262 263 * @task internal 263 264 */ 264 265 private function loadRepositories(array $symbols) { 265 - assert_instances_of($symbols, 'PhabricatorRepositorySymbol'); 266 + assert_instances_of($symbols, PhabricatorRepositorySymbol::class); 266 267 267 268 $repos = id(new PhabricatorRepositoryQuery()) 268 269 ->setViewer($this->viewer)
+3 -1
src/applications/diffusion/query/lowlevel/DiffusionLowLevelCommitFieldsQuery.php
··· 112 112 * there is only one revision found. Otherwise, we try to pick an accepted 113 113 * revision first, followed by an open revision, and otherwise we go with a 114 114 * closed or abandoned revision as a last resort. 115 + * 116 + * @param array<DifferentialRevision> $revisions 115 117 */ 116 118 private function pickBestRevision(array $revisions) { 117 - assert_instances_of($revisions, 'DifferentialRevision'); 119 + assert_instances_of($revisions, DifferentialRevision::class); 118 120 119 121 // If we have more than one revision of a given status, choose the most 120 122 // recently updated one.
+4 -1
src/applications/diffusion/symbol/DiffusionExternalSymbolQuery.php
··· 46 46 return $this; 47 47 } 48 48 49 + /** 50 + * @param array<PhabricatorRepository> $repositories 51 + */ 49 52 public function withRepositories(array $repositories) { 50 - assert_instances_of($repositories, 'PhabricatorRepository'); 53 + assert_instances_of($repositories, PhabricatorRepository::class); 51 54 $this->repositories = $repositories; 52 55 return $this; 53 56 }
+8 -2
src/applications/diffusion/view/DiffusionBranchListView.php
··· 5 5 private $branches; 6 6 private $commits = array(); 7 7 8 + /** 9 + * @param array<DiffusionRepositoryRef> $branches 10 + */ 8 11 public function setBranches(array $branches) { 9 - assert_instances_of($branches, 'DiffusionRepositoryRef'); 12 + assert_instances_of($branches, DiffusionRepositoryRef::class); 10 13 $this->branches = $branches; 11 14 return $this; 12 15 } 13 16 17 + /** 18 + * @param array<PhabricatorRepositoryCommit> $commits 19 + */ 14 20 public function setCommits(array $commits) { 15 - assert_instances_of($commits, 'PhabricatorRepositoryCommit'); 21 + assert_instances_of($commits, PhabricatorRepositoryCommit::class); 16 22 $this->commits = mpull($commits, null, 'getCommitIdentifier'); 17 23 return $this; 18 24 }
+4 -1
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 4 4 5 5 private $paths; 6 6 7 + /** 8 + * @param array<DiffusionRepositoryPath> $paths 9 + */ 7 10 public function setPaths(array $paths) { 8 - assert_instances_of($paths, 'DiffusionRepositoryPath'); 11 + assert_instances_of($paths, DiffusionRepositoryPath::class); 9 12 $this->paths = $paths; 10 13 return $this; 11 14 }
+8 -2
src/applications/diffusion/view/DiffusionCommitGraphView.php
··· 17 17 18 18 private $showAuditors; 19 19 20 + /** 21 + * @param array<DiffusionPathChange> $history 22 + */ 20 23 public function setHistory(array $history) { 21 - assert_instances_of($history, 'DiffusionPathChange'); 24 + assert_instances_of($history, DiffusionPathChange::class); 22 25 $this->history = $history; 23 26 return $this; 24 27 } ··· 27 30 return $this->history; 28 31 } 29 32 33 + /** 34 + * @param array<PhabricatorRepositoryCommit> $commits 35 + */ 30 36 public function setCommits(array $commits) { 31 - assert_instances_of($commits, 'PhabricatorRepositoryCommit'); 37 + assert_instances_of($commits, PhabricatorRepositoryCommit::class); 32 38 $this->commits = $commits; 33 39 return $this; 34 40 }
+4 -1
src/applications/diffusion/view/DiffusionPullLogListView.php
··· 4 4 5 5 private $logs; 6 6 7 + /** 8 + * @param array<PhabricatorRepositoryPullEvent> $logs 9 + */ 7 10 public function setLogs(array $logs) { 8 - assert_instances_of($logs, 'PhabricatorRepositoryPullEvent'); 11 + assert_instances_of($logs, PhabricatorRepositoryPullEvent::class); 9 12 $this->logs = $logs; 10 13 return $this; 11 14 }
+4 -1
src/applications/diffusion/view/DiffusionPushLogListView.php
··· 4 4 5 5 private $logs; 6 6 7 + /** 8 + * @param array<PhabricatorRepositoryPushLog> $logs 9 + */ 7 10 public function setLogs(array $logs) { 8 - assert_instances_of($logs, 'PhabricatorRepositoryPushLog'); 11 + assert_instances_of($logs, PhabricatorRepositoryPushLog::class); 9 12 $this->logs = $logs; 10 13 return $this; 11 14 }
+4 -1
src/applications/diffusion/view/DiffusionSyncLogListView.php
··· 4 4 5 5 private $logs; 6 6 7 + /** 8 + * @param array<PhabricatorRepositorySyncEvent> $logs 9 + */ 7 10 public function setLogs(array $logs) { 8 - assert_instances_of($logs, 'PhabricatorRepositorySyncEvent'); 11 + assert_instances_of($logs, PhabricatorRepositorySyncEvent::class); 9 12 $this->logs = $logs; 10 13 return $this; 11 14 }
+4 -1
src/applications/diffusion/view/DiffusionView.php
··· 221 221 222 222 } 223 223 224 + /** 225 + * @param array<PhabricatorRepositoryCommit> $commits 226 + */ 224 227 final protected function loadBuildables(array $commits) { 225 - assert_instances_of($commits, 'PhabricatorRepositoryCommit'); 228 + assert_instances_of($commits, PhabricatorRepositoryCommit::class); 226 229 227 230 if (!$commits) { 228 231 return array();
+4 -1
src/applications/diviner/controller/DivinerAtomController.php
··· 569 569 $out); 570 570 } 571 571 572 + /** 573 + * @param array<DivinerLiveSymbol> $symbols 574 + */ 572 575 private function buildParametersAndReturn(array $symbols) { 573 - assert_instances_of($symbols, 'DivinerLiveSymbol'); 576 + assert_instances_of($symbols, DivinerLiveSymbol::class); 574 577 575 578 $symbols = array_reverse($symbols); 576 579 $out = array();
+4 -1
src/applications/diviner/controller/DivinerController.php
··· 7 7 ->setSearchEngine(new DivinerAtomSearchEngine()); 8 8 } 9 9 10 + /** 11 + * @param array<DivinerLiveSymbol> $symbols 12 + */ 10 13 protected function renderAtomList(array $symbols) { 11 - assert_instances_of($symbols, 'DivinerLiveSymbol'); 14 + assert_instances_of($symbols, DivinerLiveSymbol::class); 12 15 13 16 $list = array(); 14 17 foreach ($symbols as $symbol) {
+14 -11
src/applications/diviner/query/DivinerAtomQuery.php
··· 139 139 return $table->loadAllFromArray($data); 140 140 } 141 141 142 + /** 143 + * @param array<DivinerLiveSymbol> $atoms 144 + */ 142 145 protected function willFilterPage(array $atoms) { 143 - assert_instances_of($atoms, 'DivinerLiveSymbol'); 146 + assert_instances_of($atoms, DivinerLiveSymbol::class); 144 147 145 148 $books = array_unique(mpull($atoms, 'getBookPHID')); 146 149 ··· 440 443 * children. When recursing, also walk up the tree and collect children of 441 444 * atoms they extend. 442 445 * 443 - * @param list<DivinerLiveSymbol> $symbols List of symbols to collect child 444 - * hashes of. 445 - * @param bool $recurse_up True to collect children of 446 - * extended atoms, as well. 447 - * @return map<string, string> Hashes of atoms' children. 446 + * @param array<DivinerLiveSymbol> $symbols List of symbols to collect child 447 + * hashes of. 448 + * @param bool $recurse_up True to collect children of 449 + * extended atoms, as well. 450 + * @return map<string, string> Hashes of atoms' children. 448 451 */ 449 452 private function getAllChildHashes(array $symbols, $recurse_up) { 450 - assert_instances_of($symbols, 'DivinerLiveSymbol'); 453 + assert_instances_of($symbols, DivinerLiveSymbol::class); 451 454 452 455 $hashes = array(); 453 456 foreach ($symbols as $symbol) { ··· 473 476 * Attach child atoms to existing atoms. In recursive mode, also attach child 474 477 * atoms to atoms that these atoms extend. 475 478 * 476 - * @param list<DivinerLiveSymbol> $symbols List of symbols to attach children 477 - * to. 479 + * @param array<DivinerLiveSymbol> $symbols List of symbols to attach 480 + * children to. 478 481 * @param map<string, DivinerLiveSymbol> $children Map of symbols, keyed by 479 482 * node hash. 480 483 * @param bool $recurse_up True to attach children to extended atoms, as ··· 486 489 array $children, 487 490 $recurse_up) { 488 491 489 - assert_instances_of($symbols, 'DivinerLiveSymbol'); 490 - assert_instances_of($children, 'DivinerLiveSymbol'); 492 + assert_instances_of($symbols, DivinerLiveSymbol::class); 493 + assert_instances_of($children, DivinerLiveSymbol::class); 491 494 492 495 foreach ($symbols as $symbol) { 493 496 $child_hashes = array();
+6 -1
src/applications/diviner/query/DivinerAtomSearchEngine.php
··· 123 123 return parent::buildSavedQueryFromBuiltin($query_key); 124 124 } 125 125 126 + /** 127 + * @param array<DivinerLiveSymbol> $symbols 128 + * @param PhabricatorSavedQuery $query 129 + * @param array<PhabricatorObjectHandle> $handles 130 + */ 126 131 protected function renderResultList( 127 132 array $symbols, 128 133 PhabricatorSavedQuery $query, 129 134 array $handles) { 130 135 131 - assert_instances_of($symbols, 'DivinerLiveSymbol'); 136 + assert_instances_of($symbols, DivinerLiveSymbol::class); 132 137 133 138 $viewer = $this->requireViewer(); 134 139
+4 -1
src/applications/diviner/query/DivinerBookQuery.php
··· 70 70 return $table->loadAllFromArray($data); 71 71 } 72 72 73 + /** 74 + * @param array<DivinerLiveBook> $books 75 + */ 73 76 protected function didFilterPage(array $books) { 74 - assert_instances_of($books, 'DivinerLiveBook'); 77 + assert_instances_of($books, DivinerLiveBook::class); 75 78 76 79 if ($this->needRepositories) { 77 80 $repositories = id(new PhabricatorRepositoryQuery())
+5 -1
src/applications/diviner/workflow/DivinerGenerateWorkflow.php
··· 375 375 return $futures; 376 376 } 377 377 378 + /** 379 + * @param array<Future> $futures 380 + * @param array<string,string> $file_hashes 381 + */ 378 382 private function resolveAtomizerFutures(array $futures, array $file_hashes) { 379 - assert_instances_of($futures, 'Future'); 383 + assert_instances_of($futures, Future::class); 380 384 381 385 $atom_cache = $this->getAtomCache(); 382 386 $bar = id(new PhutilConsoleProgressBar())
+4 -1
src/applications/doorkeeper/engine/DoorkeeperImportEngine.php
··· 19 19 return $this->viewer; 20 20 } 21 21 22 + /** 23 + * @param array<DoorkeeperObjectRef> $refs 24 + */ 22 25 public function setRefs(array $refs) { 23 - assert_instances_of($refs, 'DoorkeeperObjectRef'); 26 + assert_instances_of($refs, DoorkeeperObjectRef::class); 24 27 $this->refs = $refs; 25 28 return $this; 26 29 }
+4 -1
src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php
··· 242 242 return $this->services; 243 243 } 244 244 245 + /** 246 + * @param array<AlmanacService> $services 247 + */ 245 248 private function getActiveBindings(array $services) { 246 - assert_instances_of($services, 'AlmanacService'); 249 + assert_instances_of($services, AlmanacService::class); 247 250 $bindings = array_mergev(mpull($services, 'getActiveBindings')); 248 251 return mpull($bindings, null, 'getPHID'); 249 252 }
+5 -1
src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
··· 308 308 return mpull($map, null, 'getPHID'); 309 309 } 310 310 311 + /** 312 + * @param DrydockLease $lease 313 + * @param array<DrydockBlueprint> $filter_blueprints 314 + */ 311 315 private function newAllowedBlueprintPHIDs( 312 316 DrydockLease $lease, 313 317 array $filter_blueprints) { 314 - assert_instances_of($filter_blueprints, 'DrydockBlueprint'); 318 + assert_instances_of($filter_blueprints, DrydockBlueprint::class); 315 319 316 320 $viewer = $this->getViewer(); 317 321
+6 -1
src/applications/drydock/query/DrydockBlueprintSearchEngine.php
··· 70 70 return parent::buildSavedQueryFromBuiltin($query_key); 71 71 } 72 72 73 + /** 74 + * @param array<DrydockBlueprint> $blueprints 75 + * @param PhabricatorSavedQuery $query 76 + * @param array<PhabricatorObjectHandle> $handles 77 + */ 73 78 protected function renderResultList( 74 79 array $blueprints, 75 80 PhabricatorSavedQuery $query, 76 81 array $handles) { 77 - assert_instances_of($blueprints, 'DrydockBlueprint'); 82 + assert_instances_of($blueprints, DrydockBlueprint::class); 78 83 79 84 $viewer = $this->requireViewer(); 80 85
+6 -1
src/applications/drydock/query/DrydockRepositoryOperationSearchEngine.php
··· 78 78 return parent::buildSavedQueryFromBuiltin($query_key); 79 79 } 80 80 81 + /** 82 + * @param array<DrydockRepositoryOperation> $operations 83 + * @param PhabricatorSavedQuery $query 84 + * @param array<PhabricatorObjectHandle> $handles 85 + */ 81 86 protected function renderResultList( 82 87 array $operations, 83 88 PhabricatorSavedQuery $query, 84 89 array $handles) { 85 - assert_instances_of($operations, 'DrydockRepositoryOperation'); 90 + assert_instances_of($operations, DrydockRepositoryOperation::class); 86 91 87 92 $viewer = $this->requireViewer(); 88 93
+4 -1
src/applications/drydock/view/DrydockAuthorizationListView.php
··· 5 5 private $authorizations; 6 6 private $noDataString; 7 7 8 + /** 9 + * @param array<DrydockAuthorization> $authorizations 10 + */ 8 11 public function setAuthorizations(array $authorizations) { 9 - assert_instances_of($authorizations, 'DrydockAuthorization'); 12 + assert_instances_of($authorizations, DrydockAuthorization::class); 10 13 $this->authorizations = $authorizations; 11 14 return $this; 12 15 }
+4 -1
src/applications/drydock/view/DrydockLeaseListView.php
··· 4 4 5 5 private $leases; 6 6 7 + /** 8 + * @param array<DrydockLease> $leases 9 + */ 7 10 public function setLeases(array $leases) { 8 - assert_instances_of($leases, 'DrydockLease'); 11 + assert_instances_of($leases, DrydockLease::class); 9 12 $this->leases = $leases; 10 13 return $this; 11 14 }
+4 -1
src/applications/drydock/view/DrydockLogListView.php
··· 44 44 return $this->hideOperations; 45 45 } 46 46 47 + /** 48 + * @param array<DrydockLog> $logs 49 + */ 47 50 public function setLogs(array $logs) { 48 - assert_instances_of($logs, 'DrydockLog'); 51 + assert_instances_of($logs, DrydockLog::class); 49 52 $this->logs = $logs; 50 53 return $this; 51 54 }
+4 -1
src/applications/drydock/view/DrydockResourceListView.php
··· 4 4 5 5 private $resources; 6 6 7 + /** 8 + * @param array<DrydockResource> $resources 9 + */ 7 10 public function setResources(array $resources) { 8 - assert_instances_of($resources, 'DrydockResource'); 11 + assert_instances_of($resources, DrydockResource::class); 9 12 $this->resources = $resources; 10 13 return $this; 11 14 }
+38 -18
src/applications/drydock/worker/DrydockLeaseUpdateWorker.php
··· 240 240 throw new PhabricatorWorkerYieldException(15); 241 241 } 242 242 243 + /** 244 + * @param DrydockLease $lease 245 + * @param array<DrydockBlueprint> $blueprints 246 + */ 243 247 private function reclaimAnyResource(DrydockLease $lease, array $blueprints) { 244 - assert_instances_of($blueprints, 'DrydockBlueprint'); 248 + assert_instances_of($blueprints, DrydockBlueprint::class); 245 249 246 250 $blueprints = $this->rankBlueprints($blueprints, $lease); 247 251 ··· 331 335 throw new PhabricatorWorkerYieldException(15); 332 336 } 333 337 338 + /** 339 + * @param DrydockLease $lease 340 + * @param array<DrydockBlueprint> $blueprints 341 + */ 334 342 private function newLeasedResource( 335 343 DrydockLease $lease, 336 344 array $blueprints) { 337 - assert_instances_of($blueprints, 'DrydockBlueprint'); 345 + assert_instances_of($blueprints, DrydockBlueprint::class); 338 346 339 347 $usable_blueprints = $this->removeOverallocatedBlueprints( 340 348 $blueprints, ··· 390 398 throw new PhabricatorWorkerYieldException(15); 391 399 } 392 400 401 + /** 402 + * @param DrydockLease $lease 403 + * @param array<DrydockResource> $resources 404 + */ 393 405 private function partitionResources( 394 406 DrydockLease $lease, 395 407 array $resources) { 396 408 397 - assert_instances_of($resources, 'DrydockResource'); 409 + assert_instances_of($resources, DrydockResource::class); 398 410 $viewer = $this->getViewer(); 399 411 400 412 $lease_statuses = array( ··· 438 450 return array($free_resources, $used_resources); 439 451 } 440 452 453 + /** 454 + * @param DrydockLease $lease 455 + * @param array<DrydockBlueprint> $blueprints 456 + */ 441 457 private function newResources( 442 458 DrydockLease $lease, 443 459 array $blueprints) { 444 - assert_instances_of($blueprints, 'DrydockBlueprint'); 460 + assert_instances_of($blueprints, DrydockBlueprint::class); 445 461 446 462 $resources = array(); 447 463 $exceptions = array(); ··· 510 526 return $resources; 511 527 } 512 528 513 - 529 + /** 530 + * @param DrydockLease $lease 531 + * @param array<DrydockResource> $resources 532 + */ 514 533 private function leaseAnyResource( 515 534 DrydockLease $lease, 516 535 array $resources) { 517 - assert_instances_of($resources, 'DrydockResource'); 536 + assert_instances_of($resources, DrydockResource::class); 518 537 519 538 if (!$resources) { 520 539 return null; ··· 645 664 * Load a list of all resources which a given lease can possibly be 646 665 * allocated against. 647 666 * 648 - * @param list<DrydockBlueprint> $blueprints Blueprints which may produce 667 + * @param array<DrydockBlueprint> $blueprints Blueprints which may produce 649 668 * suitable resources. 650 669 * @param DrydockLease $lease Requested lease. 651 - * @return list<DrydockResource> Resources which may be able to allocate 670 + * @return array<DrydockResource> Resources which may be able to allocate 652 671 * the lease. 653 672 * @task allocator 654 673 */ 655 674 private function loadAcquirableResourcesForLease( 656 675 array $blueprints, 657 676 DrydockLease $lease) { 658 - assert_instances_of($blueprints, 'DrydockBlueprint'); 677 + assert_instances_of($blueprints, DrydockBlueprint::class); 659 678 $viewer = $this->getViewer(); 660 679 661 680 $resources = id(new DrydockResourceQuery()) ··· 703 722 * Remove blueprints which are too heavily allocated to build a resource for 704 723 * a lease from a list of blueprints. 705 724 * 706 - * @param list<DrydockBlueprint> $blueprints List of blueprints. 707 - * @return list<DrydockBlueprint> $lease List with blueprints that can not 725 + * @param array<DrydockBlueprint> $blueprints List of blueprints. 726 + * @param DrydockLease $lease 727 + * @return array<DrydockBlueprint> $lease List with blueprints that can not 708 728 * allocate a resource for the lease right now removed. 709 729 * @task allocator 710 730 */ 711 731 private function removeOverallocatedBlueprints( 712 732 array $blueprints, 713 733 DrydockLease $lease) { 714 - assert_instances_of($blueprints, 'DrydockBlueprint'); 734 + assert_instances_of($blueprints, DrydockBlueprint::class); 715 735 716 736 $keep = array(); 717 737 ··· 731 751 * Rank blueprints by suitability for building a new resource for a 732 752 * particular lease. 733 753 * 734 - * @param list<DrydockBlueprint> $blueprints List of blueprints. 754 + * @param array<DrydockBlueprint> $blueprints List of blueprints. 735 755 * @param DrydockLease $lease Requested lease. 736 - * @return list<DrydockBlueprint> Ranked list of blueprints. 756 + * @return array<DrydockBlueprint> Ranked list of blueprints. 737 757 * @task allocator 738 758 */ 739 759 private function rankBlueprints(array $blueprints, DrydockLease $lease) { 740 - assert_instances_of($blueprints, 'DrydockBlueprint'); 760 + assert_instances_of($blueprints, DrydockBlueprint::class); 741 761 742 762 // TODO: Implement improvements to this ranking algorithm if they become 743 763 // available. ··· 750 770 /** 751 771 * Rank resources by suitability for allocating a particular lease. 752 772 * 753 - * @param list<DrydockResource> $resources List of resources. 773 + * @param array<DrydockResource> $resources List of resources. 754 774 * @param DrydockLease $lease Requested lease. 755 - * @return list<DrydockResource> Ranked list of resources. 775 + * @return array<DrydockResource> Ranked list of resources. 756 776 * @task allocator 757 777 */ 758 778 private function rankResources(array $resources, DrydockLease $lease) { 759 - assert_instances_of($resources, 'DrydockResource'); 779 + assert_instances_of($resources, DrydockResource::class); 760 780 761 781 // TODO: Implement improvements to this ranking algorithm if they become 762 782 // available.
+1 -1
src/applications/fact/chart/PhabricatorChartDataset.php
··· 17 17 * @param array<PhabricatorComposeChartFunction> $functions 18 18 */ 19 19 final public function setFunctions(array $functions) { 20 - assert_instances_of($functions, 'PhabricatorComposeChartFunction'); 20 + assert_instances_of($functions, PhabricatorComposeChartFunction::class); 21 21 22 22 $this->functions = $functions; 23 23
+1 -1
src/applications/fact/chart/PhabricatorChartFunction.php
··· 38 38 phutil_describe_type($specs))); 39 39 } 40 40 41 - assert_instances_of($specs, 'PhabricatorChartFunctionArgument'); 41 + assert_instances_of($specs, PhabricatorChartFunctionArgument::class); 42 42 43 43 foreach ($specs as $spec) { 44 44 $parser->addArgument($spec);
+1 -1
src/applications/fact/chart/PhabricatorChartStackedAreaDataset.php
··· 229 229 PhabricatorChartDataQuery $data_query, 230 230 array $functions) { 231 231 232 - assert_instances_of($functions, 'PhabricatorChartFunction'); 232 + assert_instances_of($functions, PhabricatorChartFunction::class); 233 233 234 234 $points = array(); 235 235 foreach ($functions as $idx => $function) {
+4 -1
src/applications/fact/daemon/PhabricatorFactDaemon.php
··· 119 119 return array_mergev($facts); 120 120 } 121 121 122 + /** 123 + * @param array<PhabricatorFactIntDatapoint> $map 124 + */ 122 125 private function updateDatapoints(array $map) { 123 126 foreach ($map as $phid => $facts) { 124 - assert_instances_of($facts, 'PhabricatorFactIntDatapoint'); 127 + assert_instances_of($facts, PhabricatorFactIntDatapoint::class); 125 128 } 126 129 127 130 $phids = array_keys($map);
+4 -1
src/applications/fact/storage/PhabricatorFactChart.php
··· 54 54 return parent::save(); 55 55 } 56 56 57 + /** 58 + * @param array<PhabricatorChartDataset> $datasets 59 + */ 57 60 public function attachDatasets(array $datasets) { 58 - assert_instances_of($datasets, 'PhabricatorChartDataset'); 61 + assert_instances_of($datasets, PhabricatorChartDataset::class); 59 62 $this->datasets = $datasets; 60 63 return $this; 61 64 }
+4 -1
src/applications/feed/builder/PhabricatorFeedBuilder.php
··· 7 7 private $hovercards = false; 8 8 private $noDataString; 9 9 10 + /** 11 + * @param array<PhabricatorFeedStory> $stories 12 + */ 10 13 public function __construct(array $stories) { 11 - assert_instances_of($stories, 'PhabricatorFeedStory'); 14 + assert_instances_of($stories, PhabricatorFeedStory::class); 12 15 $this->stories = $stories; 13 16 } 14 17
+6 -1
src/applications/feed/query/PhabricatorFeedTransactionSearchEngine.php
··· 90 90 return parent::buildSavedQueryFromBuiltin($query_key); 91 91 } 92 92 93 + /** 94 + * @param array<PhabricatorApplicationTransaction> $objects 95 + * @param PhabricatorSavedQuery $query 96 + * @param array<PhabricatorObjectHandle> $handles 97 + */ 93 98 protected function renderResultList( 94 99 array $objects, 95 100 PhabricatorSavedQuery $query, 96 101 array $handles) { 97 - assert_instances_of($objects, 'PhabricatorApplicationTransaction'); 102 + assert_instances_of($objects, PhabricatorApplicationTransaction::class); 98 103 99 104 $viewer = $this->requireViewer(); 100 105
+4 -1
src/applications/feed/story/PhabricatorFeedStory.php
··· 288 288 return $this->hasViewed; 289 289 } 290 290 291 + /** 292 + * @param array<PhabricatorObjectHandle> $handles 293 + */ 291 294 final public function setHandles(array $handles) { 292 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 295 + assert_instances_of($handles, PhabricatorObjectHandle::class); 293 296 $this->handles = $handles; 294 297 return $this; 295 298 }
+5 -1
src/applications/files/diff/PhabricatorDocumentEngineBlocks.php
··· 38 38 return $this->messages; 39 39 } 40 40 41 + /** 42 + * @param ?PhabricatorDocumentRef $ref 43 + * @param array<PhabricatorDocumentEngineBlock> $blocks 44 + */ 41 45 public function addBlockList( 42 46 ?PhabricatorDocumentRef $ref = null, 43 47 array $blocks = array()) { 44 48 45 - assert_instances_of($blocks, 'PhabricatorDocumentEngineBlock'); 49 + assert_instances_of($blocks, PhabricatorDocumentEngineBlock::class); 46 50 47 51 $this->lists[] = array( 48 52 'ref' => $ref,
+4 -1
src/applications/files/favicon/PhabricatorFaviconRefQuery.php
··· 4 4 5 5 private $refs; 6 6 7 + /** 8 + * @param array<PhabricatorFaviconRef> $refs 9 + */ 7 10 public function withRefs(array $refs) { 8 - assert_instances_of($refs, 'PhabricatorFaviconRef'); 11 + assert_instances_of($refs, PhabricatorFaviconRef::class); 9 12 $this->refs = $refs; 10 13 return $this; 11 14 }
+6 -1
src/applications/files/query/PhabricatorFileSearchEngine.php
··· 122 122 return mpull($files, 'getAuthorPHID'); 123 123 } 124 124 125 + /** 126 + * @param array<PhabricatorFile> $files 127 + * @param PhabricatorSavedQuery $query 128 + * @param array<PhabricatorObjectHandle> $handles 129 + */ 125 130 protected function renderResultList( 126 131 array $files, 127 132 PhabricatorSavedQuery $query, 128 133 array $handles) { 129 134 130 - assert_instances_of($files, 'PhabricatorFile'); 135 + assert_instances_of($files, PhabricatorFile::class); 131 136 132 137 $request = $this->getRequest(); 133 138 if ($request) {
+1 -1
src/applications/files/storage/PhabricatorFile.php
··· 344 344 } 345 345 } 346 346 347 - assert_instances_of($engines, 'PhabricatorFileStorageEngine'); 347 + assert_instances_of($engines, PhabricatorFileStorageEngine::class); 348 348 if (!$engines) { 349 349 throw new Exception(pht('No valid storage engines are available!')); 350 350 }
+6 -1
src/applications/flag/query/PhabricatorFlagSearchEngine.php
··· 126 126 return $options; 127 127 } 128 128 129 + /** 130 + * @param array<PhabricatorFlag> $flags 131 + * @param PhabricatorSavedQuery $query 132 + * @param array<PhabricatorObjectHandle> $handles 133 + */ 129 134 protected function renderResultList( 130 135 array $flags, 131 136 PhabricatorSavedQuery $query, 132 137 array $handles) { 133 - assert_instances_of($flags, 'PhabricatorFlag'); 138 + assert_instances_of($flags, PhabricatorFlag::class); 134 139 135 140 $viewer = $this->requireViewer(); 136 141
+7 -7
src/applications/harbormaster/engine/HarbormasterBuildEngine.php
··· 322 322 * particularly relevant when a build uses multiple hosts since it returns 323 323 * hosts to the pool more quickly. 324 324 * 325 - * @param list<HarbormasterBuildTarget> $targets Targets in the build. 326 - * @param list<HarbormasterBuildStep> $steps List of running and waiting 327 - * steps. 325 + * @param array<HarbormasterBuildTarget> $targets Targets in the build. 326 + * @param array<HarbormasterBuildStep> $steps List of running and waiting 327 + * steps. 328 328 * @return void 329 329 */ 330 330 private function releaseUnusedArtifacts(array $targets, array $steps) { 331 - assert_instances_of($targets, 'HarbormasterBuildTarget'); 332 - assert_instances_of($steps, 'HarbormasterBuildStep'); 331 + assert_instances_of($targets, HarbormasterBuildTarget::class); 332 + assert_instances_of($steps, HarbormasterBuildStep::class); 333 333 334 334 if (!$targets || !$steps) { 335 335 return; ··· 373 373 * Process messages which were sent to these targets, kicking applicable 374 374 * targets out of "Waiting" and into either "Passed" or "Failed". 375 375 * 376 - * @param list<HarbormasterBuildTarget> $targets List of targets to process. 376 + * @param array<HarbormasterBuildTarget> $targets List of targets to process. 377 377 * @return void 378 378 */ 379 379 private function updateWaitingTargets(array $targets) { 380 - assert_instances_of($targets, 'HarbormasterBuildTarget'); 380 + assert_instances_of($targets, HarbormasterBuildTarget::class); 381 381 382 382 // We only care about messages for targets which are actually in a waiting 383 383 // state.
+4 -1
src/applications/harbormaster/plan/HarbormasterBuildPlanBehavior.php
··· 65 65 return mpull($this->options, 'getName', 'getKey'); 66 66 } 67 67 68 + /** 69 + * @param array<HarbormasterBuildPlanBehaviorOption> $options 70 + */ 68 71 public function setOptions(array $options) { 69 - assert_instances_of($options, 'HarbormasterBuildPlanBehaviorOption'); 72 + assert_instances_of($options, HarbormasterBuildPlanBehaviorOption::class); 70 73 71 74 $key_map = array(); 72 75 $default = null;
+6 -1
src/applications/harbormaster/query/HarbormasterArtifactSearchEngine.php
··· 67 67 return parent::buildSavedQueryFromBuiltin($query_key); 68 68 } 69 69 70 + /** 71 + * @param array<HarbormasterBuildArtifact> $artifacts 72 + * @param PhabricatorSavedQuery $query 73 + * @param array<PhabricatorObjectHandle> $handles 74 + */ 70 75 protected function renderResultList( 71 76 array $artifacts, 72 77 PhabricatorSavedQuery $query, 73 78 array $handles) { 74 - assert_instances_of($artifacts, 'HarbormasterBuildArtifact'); 79 + assert_instances_of($artifacts, HarbormasterBuildArtifact::class); 75 80 76 81 $viewer = $this->requireViewer(); 77 82
+6 -1
src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php
··· 76 76 return parent::buildSavedQueryFromBuiltin($query_key); 77 77 } 78 78 79 + /** 80 + * @param array<HarbormasterBuildPlan> $plans 81 + * @param PhabricatorSavedQuery $query 82 + * @param array<PhabricatorObjectHandle> $handles 83 + */ 79 84 protected function renderResultList( 80 85 array $plans, 81 86 PhabricatorSavedQuery $query, 82 87 array $handles) { 83 - assert_instances_of($plans, 'HarbormasterBuildPlan'); 88 + assert_instances_of($plans, HarbormasterBuildPlan::class); 84 89 85 90 $viewer = $this->requireViewer(); 86 91
+6 -1
src/applications/harbormaster/query/HarbormasterBuildSearchEngine.php
··· 120 120 return parent::buildSavedQueryFromBuiltin($query_key); 121 121 } 122 122 123 + /** 124 + * @param array<HarbormasterBuild> $builds 125 + * @param PhabricatorSavedQuery $query 126 + * @param array<PhabricatorObjectHandle> $handles 127 + */ 123 128 protected function renderResultList( 124 129 array $builds, 125 130 PhabricatorSavedQuery $query, 126 131 array $handles) { 127 - assert_instances_of($builds, 'HarbormasterBuild'); 132 + assert_instances_of($builds, HarbormasterBuild::class); 128 133 129 134 $viewer = $this->requireViewer(); 130 135
+6 -1
src/applications/harbormaster/query/HarbormasterBuildStepSearchEngine.php
··· 47 47 return parent::buildSavedQueryFromBuiltin($query_key); 48 48 } 49 49 50 + /** 51 + * @param array<HarbormasterBuildStep> $plans 52 + * @param PhabricatorSavedQuery $query 53 + * @param array<PhabricatorObjectHandle> $handles 54 + */ 50 55 protected function renderResultList( 51 56 array $plans, 52 57 PhabricatorSavedQuery $query, 53 58 array $handles) { 54 - assert_instances_of($plans, 'HarbormasterBuildStep'); 59 + assert_instances_of($plans, HarbormasterBuildStep::class); 55 60 return null; 56 61 } 57 62
+6 -1
src/applications/harbormaster/query/HarbormasterBuildTargetSearchEngine.php
··· 117 117 return parent::buildSavedQueryFromBuiltin($query_key); 118 118 } 119 119 120 + /** 121 + * @param array<HarbormasterBuildTarget> $builds 122 + * @param PhabricatorSavedQuery $query 123 + * @param array<PhabricatorObjectHandle> $handles 124 + */ 120 125 protected function renderResultList( 121 126 array $builds, 122 127 PhabricatorSavedQuery $query, 123 128 array $handles) { 124 - assert_instances_of($builds, 'HarbormasterBuildTarget'); 129 + assert_instances_of($builds, HarbormasterBuildTarget::class); 125 130 126 131 // Currently, this only supports the "harbormaster.target.search" 127 132 // API method.
+6 -1
src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php
··· 116 116 return parent::buildSavedQueryFromBuiltin($query_key); 117 117 } 118 118 119 + /** 120 + * @param array<HarbormasterBuildable> $buildables 121 + * @param PhabricatorSavedQuery $query 122 + * @param array<PhabricatorObjectHandle> $handles 123 + */ 119 124 protected function renderResultList( 120 125 array $buildables, 121 126 PhabricatorSavedQuery $query, 122 127 array $handles) { 123 - assert_instances_of($buildables, 'HarbormasterBuildable'); 128 + assert_instances_of($buildables, HarbormasterBuildable::class); 124 129 125 130 $viewer = $this->requireViewer(); 126 131
+7 -3
src/applications/harbormaster/storage/HarbormasterBuildable.php
··· 62 62 * 63 63 * @param string $phid PHID of the object to build. 64 64 * @param string $container_phid Container PHID for the buildable. 65 - * @param list<HarbormasterBuildRequest> $requests List of builds to perform. 65 + * @param array<HarbormasterBuildRequest> $requests List of builds to 66 + * perform. 66 67 * @return void 67 68 */ 68 69 public static function applyBuildPlans( ··· 70 71 $container_phid, 71 72 array $requests) { 72 73 73 - assert_instances_of($requests, 'HarbormasterBuildRequest'); 74 + assert_instances_of($requests, HarbormasterBuildRequest::class); 74 75 75 76 if (!$requests) { 76 77 return; ··· 208 209 return $this->assertAttached($this->containerObject); 209 210 } 210 211 212 + /** 213 + * @param array<HarbormasterBuild> $builds 214 + */ 211 215 public function attachBuilds(array $builds) { 212 - assert_instances_of($builds, 'HarbormasterBuild'); 216 + assert_instances_of($builds, HarbormasterBuild::class); 213 217 $this->builds = $builds; 214 218 return $this; 215 219 }
+4 -1
src/applications/harbormaster/storage/build/HarbormasterBuild.php
··· 309 309 return array($pending_status, $apply_messages); 310 310 } 311 311 312 + /** 313 + * @param array<HarbormasterBuildMessage> $messages 314 + */ 312 315 public function attachUnprocessedMessages(array $messages) { 313 - assert_instances_of($messages, 'HarbormasterBuildMessage'); 316 + assert_instances_of($messages, HarbormasterBuildMessage::class); 314 317 $this->unprocessedMessages = $messages; 315 318 return $this; 316 319 }
+4 -1
src/applications/harbormaster/storage/configuration/HarbormasterBuildPlan.php
··· 75 75 HarbormasterBuildPlanPHIDType::TYPECONST); 76 76 } 77 77 78 + /** 79 + * @param array<HarbormasterBuildStep> $steps 80 + */ 78 81 public function attachBuildSteps(array $steps) { 79 - assert_instances_of($steps, 'HarbormasterBuildStep'); 82 + assert_instances_of($steps, HarbormasterBuildStep::class); 80 83 $this->buildSteps = $steps; 81 84 return $this; 82 85 }
+4 -1
src/applications/harbormaster/view/HarbormasterBuildView.php
··· 5 5 6 6 private $builds = array(); 7 7 8 + /** 9 + * @param array<HarbormasterBuild> $builds 10 + */ 8 11 public function setBuilds(array $builds) { 9 - assert_instances_of($builds, 'HarbormasterBuild'); 12 + assert_instances_of($builds, HarbormasterBuild::class); 10 13 $this->builds = $builds; 11 14 return $this; 12 15 }
+4 -1
src/applications/harbormaster/view/HarbormasterLintPropertyView.php
··· 11 11 return $this; 12 12 } 13 13 14 + /** 15 + * @param array<HarbormasterBuildLintMessage> $messages 16 + */ 14 17 public function setLintMessages(array $messages) { 15 - assert_instances_of($messages, 'HarbormasterBuildLintMessage'); 18 + assert_instances_of($messages, HarbormasterBuildLintMessage::class); 16 19 $this->lintMessages = $messages; 17 20 return $this; 18 21 }
+4 -1
src/applications/harbormaster/view/HarbormasterUnitPropertyView.php
··· 13 13 return $this; 14 14 } 15 15 16 + /** 17 + * @param array<HarbormasterBuildUnitMessage> $messages 18 + */ 16 19 public function setUnitMessages(array $messages) { 17 - assert_instances_of($messages, 'HarbormasterBuildUnitMessage'); 20 + assert_instances_of($messages, HarbormasterBuildUnitMessage::class); 18 21 $this->unitMessages = $messages; 19 22 return $this; 20 23 }
+2 -1
src/applications/herald/editor/HeraldRuleSerializer.php
··· 13 13 } 14 14 15 15 /** 16 + <<<<<<< HEAD 16 17 * @param $match_all 17 18 * @param array<HeraldCondition> $conditions 18 19 * @param array<HeraldActionRecord> $actions 19 - * @param $repetition_policy 20 + * @param string $repetition_policy One of the HeraldRule::REPEAT_ constants 20 21 * @return array 21 22 */ 22 23 public function serializeRuleComponents(
+1 -1
src/applications/herald/engine/HeraldEngine.php
··· 125 125 /** 126 126 * @param array<HeraldRule> $rules 127 127 * @param HeraldAdapter $object 128 - * @return array 128 + * @return array<HeraldEffect> 129 129 */ 130 130 public function applyRules(array $rules, HeraldAdapter $object) { 131 131 assert_instances_of($rules, HeraldRule::class);
+1 -1
src/applications/herald/query/HeraldRuleSearchEngine.php
··· 133 133 /** 134 134 * @param array<HeraldRule> $rules 135 135 * @param PhabricatorSavedQuery $query 136 - * @param array $handles 136 + * @param array<PhabricatorObjectHandle> $handles 137 137 */ 138 138 protected function renderResultList( 139 139 array $rules,
+1 -1
src/applications/herald/query/HeraldTranscriptSearchEngine.php
··· 107 107 /** 108 108 * @param array<HeraldTranscript> $transcripts 109 109 * @param PhabricatorSavedQuery $query 110 - * @param array $handles 110 + * @param array<PhabricatorObjectHandle> $handles 111 111 */ 112 112 protected function renderResultList( 113 113 array $transcripts,
+6 -1
src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
··· 103 103 return parent::buildSavedQueryFromBuiltin($query_key); 104 104 } 105 105 106 + /** 107 + * @param array<LegalpadDocument> $documents 108 + * @param PhabricatorSavedQuery $query 109 + * @param array<PhabricatorObjectHandle> $handles 110 + */ 106 111 protected function renderResultList( 107 112 array $documents, 108 113 PhabricatorSavedQuery $query, 109 114 array $handles) { 110 - assert_instances_of($documents, 'LegalpadDocument'); 115 + assert_instances_of($documents, LegalpadDocument::class); 111 116 112 117 $viewer = $this->requireViewer(); 113 118
+6 -1
src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php
··· 216 216 mpull($signatures, 'getDocumentPHID')); 217 217 } 218 218 219 + /** 220 + * @param array<LegalpadDocumentSignature> $signatures 221 + * @param PhabricatorSavedQuery $query 222 + * @param array<PhabricatorObjectHandle> $handles 223 + */ 219 224 protected function renderResultList( 220 225 array $signatures, 221 226 PhabricatorSavedQuery $query, 222 227 array $handles) { 223 - assert_instances_of($signatures, 'LegalpadDocumentSignature'); 228 + assert_instances_of($signatures, LegalpadDocumentSignature::class); 224 229 225 230 $viewer = $this->requireViewer(); 226 231
+6 -1
src/applications/macro/query/PhabricatorMacroSearchEngine.php
··· 127 127 return parent::buildSavedQueryFromBuiltin($query_key); 128 128 } 129 129 130 + /** 131 + * @param array<PhabricatorFileImageMacro> $macros 132 + * @param PhabricatorSavedQuery $query 133 + * @param array<PhabricatorObjectHandle> $handles 134 + */ 130 135 protected function renderResultList( 131 136 array $macros, 132 137 PhabricatorSavedQuery $query, 133 138 array $handles) { 134 139 135 - assert_instances_of($macros, 'PhabricatorFileImageMacro'); 140 + assert_instances_of($macros, PhabricatorFileImageMacro::class); 136 141 $viewer = $this->requireViewer(); 137 142 $handles = $viewer->loadHandles(mpull($macros, 'getAuthorPHID')); 138 143
+4 -1
src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php
··· 217 217 ->executeOne(); 218 218 } 219 219 220 + /** 221 + * @param array<ManiphestTask> $tasks 222 + */ 220 223 protected function buildTaskInfoDictionaries(array $tasks) { 221 - assert_instances_of($tasks, 'ManiphestTask'); 224 + assert_instances_of($tasks, ManiphestTask::class); 222 225 if (!$tasks) { 223 226 return array(); 224 227 }
+2 -1
src/applications/maniphest/controller/ManiphestReportController.php
··· 571 571 * Render date of oldest open task per user or per project with a link. 572 572 * Used on /maniphest/report/user/ and /maniphest/report/project/ URIs. 573 573 * 574 + * @param array<ManiphestTask> $tasks 574 575 * @return array<PhutilSafeHTML,int> HTML link markup and the timespan 575 576 * (as epoch) since task creation 576 577 */ 577 578 private function renderOldest(array $tasks) { 578 - assert_instances_of($tasks, 'ManiphestTask'); 579 + assert_instances_of($tasks, ManiphestTask::class); 579 580 $oldest = null; 580 581 foreach ($tasks as $id => $task) { 581 582 if (($oldest === null) ||
+8 -3
src/applications/maniphest/view/ManiphestTaskListView.php
··· 152 152 return $list; 153 153 } 154 154 155 - // This method should be removed, and all call-sites switch 156 - // to use ManiphestSearchEngine 155 + /** 156 + * Deprecated. 157 + * @param PhabricatorUser $viewer 158 + * @param array<ManiphestTask> $tasks 159 + */ 157 160 public static function loadTaskHandles( 158 161 PhabricatorUser $viewer, 159 162 array $tasks) { 160 - assert_instances_of($tasks, 'ManiphestTask'); 163 + // TODO: This method should be removed, and all call-sites switch 164 + // to use ManiphestSearchEngine 165 + assert_instances_of($tasks, ManiphestTask::class); 161 166 162 167 $phids = array(); 163 168 foreach ($tasks as $task) {
+8 -3
src/applications/maniphest/view/ManiphestTaskResultListView.php
··· 87 87 ); 88 88 } 89 89 90 - 90 + /** 91 + * @param array<ManiphestTask> $tasks 92 + * @param string $group 93 + * @param array<PhabricatorObjectHandle> $handles 94 + * @return array<string,array<ManiphestTask>> 95 + */ 91 96 private function groupTasks(array $tasks, $group, array $handles) { 92 - assert_instances_of($tasks, 'ManiphestTask'); 93 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 97 + assert_instances_of($tasks, ManiphestTask::class); 98 + assert_instances_of($handles, PhabricatorObjectHandle::class); 94 99 95 100 $groups = $this->getTaskGrouping($tasks, $group); 96 101
+7 -2
src/applications/meta/query/PhabricatorAppSearchEngine.php
··· 178 178 return parent::buildSavedQueryFromBuiltin($query_key); 179 179 } 180 180 181 + /** 182 + * @param array<PhabricatorApplication> $all_applications 183 + * @param PhabricatorSavedQuery $query 184 + * @param array<PhabricatorObjectHandle> $handles 185 + */ 181 186 protected function renderResultList( 182 187 array $all_applications, 183 188 PhabricatorSavedQuery $query, 184 - array $handle) { 185 - assert_instances_of($all_applications, 'PhabricatorApplication'); 189 + array $handles) { 190 + assert_instances_of($all_applications, PhabricatorApplication::class); 186 191 187 192 $all_applications = msort($all_applications, 'getName'); 188 193
+11 -3
src/applications/metamta/engine/PhabricatorMailEmailEngine.php
··· 537 537 return $install_uri->getDomain(); 538 538 } 539 539 540 + /** 541 + * @param array<PhabricatorMailHeader> $headers 542 + * @param bool $must_encrypt 543 + */ 540 544 private function filterHeaders(array $headers, $must_encrypt) { 541 - assert_instances_of($headers, 'PhabricatorMailHeader'); 545 + assert_instances_of($headers, PhabricatorMailHeader::class); 542 546 543 547 if (!$must_encrypt) { 544 548 return $headers; ··· 582 586 return $headers; 583 587 } 584 588 589 + /** 590 + * @param array<PhutilEmailAddress> $addresses 591 + * @param array<PhutilEmailAddress> $exclude 592 + */ 585 593 private function getUniqueEmailAddresses( 586 594 array $addresses, 587 595 array $exclude = array()) { 588 - assert_instances_of($addresses, 'PhutilEmailAddress'); 589 - assert_instances_of($exclude, 'PhutilEmailAddress'); 596 + assert_instances_of($addresses, PhutilEmailAddress::class); 597 + assert_instances_of($exclude, PhutilEmailAddress::class); 590 598 591 599 $seen = array(); 592 600
+4 -1
src/applications/metamta/engine/PhabricatorMailMessageEngine.php
··· 27 27 return $this->mail; 28 28 } 29 29 30 + /** 31 + * @param array<PhabricatorMetaMTAActor> $actors 32 + */ 30 33 final public function setActors(array $actors) { 31 - assert_instances_of($actors, 'PhabricatorMetaMTAActor'); 34 + assert_instances_of($actors, PhabricatorMetaMTAActor::class); 32 35 $this->actors = $actors; 33 36 return $this; 34 37 }
+16 -4
src/applications/metamta/message/PhabricatorMailEmailMessage.php
··· 37 37 return $this->replyToAddress; 38 38 } 39 39 40 + /** 41 + * @param array<PhutilEmailAddress> $addresses 42 + */ 40 43 public function setToAddresses(array $addresses) { 41 - assert_instances_of($addresses, 'PhutilEmailAddress'); 44 + assert_instances_of($addresses, PhutilEmailAddress::class); 42 45 $this->toAddresses = $addresses; 43 46 return $this; 44 47 } ··· 47 50 return $this->toAddresses; 48 51 } 49 52 53 + /** 54 + * @param array<PhutilEmailAddress> $addresses 55 + */ 50 56 public function setCCAddresses(array $addresses) { 51 - assert_instances_of($addresses, 'PhutilEmailAddress'); 57 + assert_instances_of($addresses, PhutilEmailAddress::class); 52 58 $this->ccAddresses = $addresses; 53 59 return $this; 54 60 } ··· 57 63 return $this->ccAddresses; 58 64 } 59 65 66 + /** 67 + * @param array<PhabricatorMailHeader> $headers 68 + */ 60 69 public function setHeaders(array $headers) { 61 - assert_instances_of($headers, 'PhabricatorMailHeader'); 70 + assert_instances_of($headers, PhabricatorMailHeader::class); 62 71 $this->headers = $headers; 63 72 return $this; 64 73 } ··· 67 76 return $this->headers; 68 77 } 69 78 79 + /** 80 + * @param array<PhabricatorMailAttachment> $attachments 81 + */ 70 82 public function setAttachments(array $attachments) { 71 - assert_instances_of($attachments, 'PhabricatorMailAttachment'); 83 + assert_instances_of($attachments, PhabricatorMailAttachment::class); 72 84 $this->attachments = $attachments; 73 85 return $this; 74 86 }
+5 -1
src/applications/metamta/query/PhabricatorMetaMTAActorQuery.php
··· 45 45 return $actors; 46 46 } 47 47 48 + /** 49 + * @param array<PhabricatorMetaMTAActor> $actors 50 + * @param array<string> $phids 51 + */ 48 52 private function loadUserActors(array $actors, array $phids) { 49 - assert_instances_of($actors, 'PhabricatorMetaMTAActor'); 53 + assert_instances_of($actors, PhabricatorMetaMTAActor::class); 50 54 51 55 $emails = id(new PhabricatorUserEmail())->loadAllWhere( 52 56 'userPHID IN (%Ls) AND isPrimary = 1',
+6 -1
src/applications/metamta/query/PhabricatorMetaMTAMailSearchEngine.php
··· 94 94 return array_mergev($phids); 95 95 } 96 96 97 + /** 98 + * @param array<PhabricatorMetaMTAMail> $mails 99 + * @param PhabricatorSavedQuery $query 100 + * @param array<PhabricatorObjectHandle> $handles 101 + */ 97 102 protected function renderResultList( 98 103 array $mails, 99 104 PhabricatorSavedQuery $query, 100 105 array $handles) { 101 106 102 - assert_instances_of($mails, 'PhabricatorMetaMTAMail'); 107 + assert_instances_of($mails, PhabricatorMetaMTAMail::class); 103 108 $viewer = $this->requireViewer(); 104 109 $list = new PHUIObjectItemListView(); 105 110
+12 -3
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 239 239 ->execute(); 240 240 } 241 241 242 + /** 243 + * @param array<PhabricatorMailAttachment> $attachments 244 + */ 242 245 public function setAttachments(array $attachments) { 243 - assert_instances_of($attachments, 'PhabricatorMailAttachment'); 246 + assert_instances_of($attachments, PhabricatorMailAttachment::class); 244 247 $this->setParam('attachments', mpull($attachments, 'toDictionary')); 245 248 return $this; 246 249 } ··· 880 883 return array_keys($results); 881 884 } 882 885 886 + /** 887 + * @param array<PhabricatorMetaMTAActor> $actors 888 + */ 883 889 private function filterDeliverableActors(array $actors) { 884 - assert_instances_of($actors, 'PhabricatorMetaMTAActor'); 890 + assert_instances_of($actors, PhabricatorMetaMTAActor::class); 885 891 $deliverable_actors = array(); 886 892 foreach ($actors as $phid => $actor) { 887 893 if ($actor->isDeliverable()) { ··· 1088 1094 return $this->setParam('headers.unfiltered', $headers); 1089 1095 } 1090 1096 1097 + /** 1098 + * @param array<PhabricatorMailHeader> $headers 1099 + */ 1091 1100 private function flattenHeaders(array $headers) { 1092 - assert_instances_of($headers, 'PhabricatorMailHeader'); 1101 + assert_instances_of($headers, PhabricatorMailHeader::class); 1093 1102 1094 1103 $list = array(); 1095 1104 foreach ($list as $header) {
+4 -1
src/applications/notification/builder/PhabricatorNotificationBuilder.php
··· 7 7 private $user = null; 8 8 private $showTimestamps = true; 9 9 10 + /** 11 + * @param array<PhabricatorFeedStory> $stories 12 + */ 10 13 public function __construct(array $stories) { 11 - assert_instances_of($stories, 'PhabricatorFeedStory'); 14 + assert_instances_of($stories, PhabricatorFeedStory::class); 12 15 $this->stories = $stories; 13 16 } 14 17
+6 -1
src/applications/notification/query/PhabricatorNotificationSearchEngine.php
··· 76 76 return parent::buildSavedQueryFromBuiltin($query_key); 77 77 } 78 78 79 + /** 80 + * @param array<PhabricatorFeedStory> $notifications 81 + * @param PhabricatorSavedQuery $query 82 + * @param array<PhabricatorObjectHandle> $handles 83 + */ 79 84 protected function renderResultList( 80 85 array $notifications, 81 86 PhabricatorSavedQuery $query, 82 87 array $handles) { 83 - assert_instances_of($notifications, 'PhabricatorFeedStory'); 88 + assert_instances_of($notifications, PhabricatorFeedStory::class); 84 89 85 90 $viewer = $this->requireViewer(); 86 91
+6 -1
src/applications/nuance/query/NuanceItemSearchEngine.php
··· 50 50 return parent::buildSavedQueryFromBuiltin($query_key); 51 51 } 52 52 53 + /** 54 + * @param array<NuanceItem> $items 55 + * @param PhabricatorSavedQuery $query 56 + * @param array<PhabricatorObjectHandle> $handles 57 + */ 53 58 protected function renderResultList( 54 59 array $items, 55 60 PhabricatorSavedQuery $query, 56 61 array $handles) { 57 - assert_instances_of($items, 'NuanceItem'); 62 + assert_instances_of($items, NuanceItem::class); 58 63 59 64 $viewer = $this->requireViewer(); 60 65
+6 -1
src/applications/nuance/query/NuanceQueueSearchEngine.php
··· 49 49 return parent::buildSavedQueryFromBuiltin($query_key); 50 50 } 51 51 52 + /** 53 + * @param array<NuanceQueue> $queues 54 + * @param PhabricatorSavedQuery $query 55 + * @param array<PhabricatorObjectHandle> $handles 56 + */ 52 57 protected function renderResultList( 53 58 array $queues, 54 59 PhabricatorSavedQuery $query, 55 60 array $handles) { 56 - assert_instances_of($queues, 'NuanceQueue'); 61 + assert_instances_of($queues, NuanceQueue::class); 57 62 58 63 $viewer = $this->requireViewer(); 59 64
+6 -1
src/applications/nuance/query/NuanceSourceSearchEngine.php
··· 58 58 return parent::buildSavedQueryFromBuiltin($query_key); 59 59 } 60 60 61 + /** 62 + * @param array<NuanceSource> $sources 63 + * @param PhabricatorSavedQuery $query 64 + * @param array<PhabricatorObjectHandle> $handles 65 + */ 61 66 protected function renderResultList( 62 67 array $sources, 63 68 PhabricatorSavedQuery $query, 64 69 array $handles) { 65 - assert_instances_of($sources, 'NuanceSource'); 70 + assert_instances_of($sources, NuanceSource::class); 66 71 67 72 $viewer = $this->requireViewer(); 68 73
+6 -1
src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
··· 73 73 return parent::buildSavedQueryFromBuiltin($query_key); 74 74 } 75 75 76 + /** 77 + * @param array<PhabricatorOAuthServerClient> $clients 78 + * @param PhabricatorSavedQuery $query 79 + * @param array<PhabricatorObjectHandle> $handles 80 + */ 76 81 protected function renderResultList( 77 82 array $clients, 78 83 PhabricatorSavedQuery $query, 79 84 array $handles) { 80 - assert_instances_of($clients, 'PhabricatorOAuthServerClient'); 85 + assert_instances_of($clients, PhabricatorOAuthServerClient::class); 81 86 82 87 $viewer = $this->requireViewer(); 83 88
+6 -1
src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php
··· 121 121 return parent::buildSavedQueryFromBuiltin($query_key); 122 122 } 123 123 124 + /** 125 + * @param array<PhabricatorOwnersPackage> $packages 126 + * @param PhabricatorSavedQuery $query 127 + * @param array<PhabricatorObjectHandle> $handles 128 + */ 124 129 protected function renderResultList( 125 130 array $packages, 126 131 PhabricatorSavedQuery $query, 127 132 array $handles) { 128 - assert_instances_of($packages, 'PhabricatorOwnersPackage'); 133 + assert_instances_of($packages, PhabricatorOwnersPackage::class); 129 134 130 135 $viewer = $this->requireViewer(); 131 136
+4 -1
src/applications/owners/storage/PhabricatorOwnersOwner.php
··· 24 24 ) + parent::getConfiguration(); 25 25 } 26 26 27 + /** 28 + * @param array<PhabricatorOwnersPackage> $packages 29 + */ 27 30 public static function loadAllForPackages(array $packages) { 28 - assert_instances_of($packages, 'PhabricatorOwnersPackage'); 31 + assert_instances_of($packages, PhabricatorOwnersPackage::class); 29 32 if (!$packages) { 30 33 return array(); 31 34 }
+14 -3
src/applications/owners/storage/PhabricatorOwnersPackage.php
··· 212 212 return self::loadPackagesForPaths($repository, $paths); 213 213 } 214 214 215 + /** 216 + * @param PhabricatorRepository $repository 217 + * @param DifferentialDiff $diff 218 + * @param array<DifferentialChangeset> $changesets 219 + */ 215 220 public static function loadAffectedPackagesForChangesets( 216 221 PhabricatorRepository $repository, 217 222 DifferentialDiff $diff, 218 223 array $changesets) { 219 - assert_instances_of($changesets, 'DifferentialChangeset'); 224 + assert_instances_of($changesets, DifferentialChangeset::class); 220 225 221 226 $paths_all = array(); 222 227 $paths_ungenerated = array(); ··· 518 523 return $result; 519 524 } 520 525 526 + /** 527 + * @param array<PhabricatorOwnersPath> $paths 528 + */ 521 529 public function attachPaths(array $paths) { 522 - assert_instances_of($paths, 'PhabricatorOwnersPath'); 530 + assert_instances_of($paths, PhabricatorOwnersPath::class); 523 531 $this->paths = $paths; 524 532 525 533 // Drop this cache if we're attaching new paths. ··· 549 557 return $this->pathRepositoryMap[$repository_phid]; 550 558 } 551 559 560 + /** 561 + * @param array<PhabricatorOwnersOwner> $owners 562 + */ 552 563 public function attachOwners(array $owners) { 553 - assert_instances_of($owners, 'PhabricatorOwnersOwner'); 564 + assert_instances_of($owners, PhabricatorOwnersOwner::class); 554 565 $this->owners = $owners; 555 566 return $this; 556 567 }
+6 -1
src/applications/packages/query/PhabricatorPackagesPackageSearchEngine.php
··· 72 72 return parent::buildSavedQueryFromBuiltin($query_key); 73 73 } 74 74 75 + /** 76 + * @param array<PhabricatorPackagesPackage> $packages 77 + * @param PhabricatorSavedQuery $query 78 + * @param array<PhabricatorObjectHandle> $handles 79 + */ 75 80 protected function renderResultList( 76 81 array $packages, 77 82 PhabricatorSavedQuery $query, 78 83 array $handles) { 79 84 80 - assert_instances_of($packages, 'PhabricatorPackagesPackage'); 85 + assert_instances_of($packages, PhabricatorPackagesPackage::class); 81 86 $viewer = $this->requireViewer(); 82 87 83 88 $list = id(new PhabricatorPackagesPackageListView())
+6 -1
src/applications/packages/query/PhabricatorPackagesPublisherSearchEngine.php
··· 62 62 return parent::buildSavedQueryFromBuiltin($query_key); 63 63 } 64 64 65 + /** 66 + * @param array<PhabricatorPackagesPublisher> $publishers 67 + * @param PhabricatorSavedQuery $query 68 + * @param array<PhabricatorObjectHandle> $handles 69 + */ 65 70 protected function renderResultList( 66 71 array $publishers, 67 72 PhabricatorSavedQuery $query, 68 73 array $handles) { 69 74 70 - assert_instances_of($publishers, 'PhabricatorPackagesPublisher'); 75 + assert_instances_of($publishers, PhabricatorPackagesPublisher::class); 71 76 72 77 $viewer = $this->requireViewer(); 73 78
+6 -1
src/applications/packages/query/PhabricatorPackagesVersionSearchEngine.php
··· 71 71 return parent::buildSavedQueryFromBuiltin($query_key); 72 72 } 73 73 74 + /** 75 + * @param array<PhabricatorPackagesVersion> $versions 76 + * @param PhabricatorSavedQuery $query 77 + * @param array<PhabricatorObjectHandle> $handles 78 + */ 74 79 protected function renderResultList( 75 80 array $versions, 76 81 PhabricatorSavedQuery $query, 77 82 array $handles) { 78 83 79 - assert_instances_of($versions, 'PhabricatorPackagesVersion'); 84 + assert_instances_of($versions, PhabricatorPackagesVersion::class); 80 85 $viewer = $this->requireViewer(); 81 86 82 87 $list = id(new PhabricatorPackagesVersionListView())
+4 -1
src/applications/packages/view/PhabricatorPackagesPackageListView.php
··· 5 5 6 6 private $packages; 7 7 8 + /** 9 + * @param array<PhabricatorPackagesPackage> $packages 10 + */ 8 11 public function setPackages(array $packages) { 9 - assert_instances_of($packages, 'PhabricatorPackagesPackage'); 12 + assert_instances_of($packages, PhabricatorPackagesPackage::class); 10 13 $this->packages = $packages; 11 14 return $this; 12 15 }
+4 -1
src/applications/packages/view/PhabricatorPackagesPublisherListView.php
··· 5 5 6 6 private $publishers; 7 7 8 + /** 9 + * @param array<PhabricatorPackagesPublisher> $publishers 10 + */ 8 11 public function setPublishers(array $publishers) { 9 - assert_instances_of($publishers, 'PhabricatorPackagesPublisher'); 12 + assert_instances_of($publishers, PhabricatorPackagesPublisher::class); 10 13 $this->publishers = $publishers; 11 14 return $this; 12 15 }
+4 -1
src/applications/packages/view/PhabricatorPackagesVersionListView.php
··· 5 5 6 6 private $versions; 7 7 8 + /** 9 + * @param array<PhabricatorPackagesVersion> $versions 10 + */ 8 11 public function setVersions(array $versions) { 9 - assert_instances_of($versions, 'PhabricatorPackagesVersion'); 12 + assert_instances_of($versions, PhabricatorPackagesVersion::class); 10 13 $this->versions = $versions; 11 14 return $this; 12 15 }
+6 -1
src/applications/passphrase/query/PassphraseCredentialSearchEngine.php
··· 69 69 return parent::buildSavedQueryFromBuiltin($query_key); 70 70 } 71 71 72 + /** 73 + * @param array<PassphraseCredential> $credentials 74 + * @param PhabricatorSavedQuery $query 75 + * @param array<PhabricatorObjectHandle> $handles 76 + */ 72 77 protected function renderResultList( 73 78 array $credentials, 74 79 PhabricatorSavedQuery $query, 75 80 array $handles) { 76 - assert_instances_of($credentials, 'PassphraseCredential'); 81 + assert_instances_of($credentials, PassphraseCredential::class); 77 82 78 83 $viewer = $this->requireViewer(); 79 84
+4 -1
src/applications/passphrase/view/PassphraseCredentialControl.php
··· 26 26 return $this->credentialType; 27 27 } 28 28 29 + /** 30 + * @param array<PassphraseCredential> $options 31 + */ 29 32 public function setOptions(array $options) { 30 - assert_instances_of($options, 'PassphraseCredential'); 33 + assert_instances_of($options, PassphraseCredential::class); 31 34 $this->options = $options; 32 35 return $this; 33 36 }
+5 -1
src/applications/people/management/PhabricatorPeopleManagementWorkflow.php
··· 36 36 return $user; 37 37 } 38 38 39 + /** 40 + * @param PhabricatorUser $user 41 + * @param array<PhabricatorUserTransaction> $xactions 42 + */ 39 43 final protected function applyTransactions( 40 44 PhabricatorUser $user, 41 45 array $xactions) { 42 - assert_instances_of($xactions, 'PhabricatorUserTransaction'); 46 + assert_instances_of($xactions, PhabricatorUserTransaction::class); 43 47 44 48 $viewer = $this->getViewer(); 45 49 $application = id(new PhabricatorPeopleApplication())->getPHID();
+6 -1
src/applications/people/query/PhabricatorPeopleLogSearchEngine.php
··· 124 124 return parent::buildSavedQueryFromBuiltin($query_key); 125 125 } 126 126 127 + /** 128 + * @param array<PhabricatorUserLog> $logs 129 + * @param PhabricatorSavedQuery $query 130 + * @param array<PhabricatorObjectHandle> $handles 131 + */ 127 132 protected function renderResultList( 128 133 array $logs, 129 134 PhabricatorSavedQuery $query, 130 135 array $handles) { 131 - assert_instances_of($logs, 'PhabricatorUserLog'); 136 + assert_instances_of($logs, PhabricatorUserLog::class); 132 137 133 138 $viewer = $this->requireViewer(); 134 139
+6 -1
src/applications/people/query/PhabricatorPeopleSearchEngine.php
··· 235 235 return parent::buildSavedQueryFromBuiltin($query_key); 236 236 } 237 237 238 + /** 239 + * @param array<PhabricatorUser> $users 240 + * @param PhabricatorSavedQuery $query 241 + * @param array<PhabricatorObjectHandle> $handles 242 + */ 238 243 protected function renderResultList( 239 244 array $users, 240 245 PhabricatorSavedQuery $query, 241 246 array $handles) { 242 247 243 - assert_instances_of($users, 'PhabricatorUser'); 248 + assert_instances_of($users, PhabricatorUser::class); 244 249 245 250 $request = $this->getRequest(); 246 251 $viewer = $this->requireViewer();
+6 -1
src/applications/people/storage/PhabricatorExternalAccount.php
··· 158 158 return array_values($raw); 159 159 } 160 160 161 + /** 162 + * @param array<PhabricatorExternalAccountIdentifier> $identifiers 163 + */ 161 164 public function attachAccountIdentifiers(array $identifiers) { 162 - assert_instances_of($identifiers, 'PhabricatorExternalAccountIdentifier'); 165 + assert_instances_of( 166 + $identifiers, 167 + PhabricatorExternalAccountIdentifier::class); 163 168 $this->accountIdentifiers = mpull($identifiers, null, 'getIdentifierRaw'); 164 169 return $this; 165 170 }
+4 -1
src/applications/people/view/PhabricatorUserLogView.php
··· 10 10 return $this; 11 11 } 12 12 13 + /** 14 + * @param array<PhabricatorUserLog> $logs 15 + */ 13 16 public function setLogs(array $logs) { 14 - assert_instances_of($logs, 'PhabricatorUserLog'); 17 + assert_instances_of($logs, PhabricatorUserLog::class); 15 18 $this->logs = $logs; 16 19 return $this; 17 20 }
+7 -1
src/applications/phame/query/PhameBlogSearchEngine.php
··· 67 67 68 68 return parent::buildSavedQueryFromBuiltin($query_key); 69 69 } 70 + 71 + /** 72 + * @param array<PhameBlog> $blogs 73 + * @param PhabricatorSavedQuery $query 74 + * @param array<PhabricatorObjectHandle> $handles 75 + */ 70 76 protected function renderResultList( 71 77 array $blogs, 72 78 PhabricatorSavedQuery $query, 73 79 array $handles) { 74 80 75 - assert_instances_of($blogs, 'PhameBlog'); 81 + assert_instances_of($blogs, PhameBlog::class); 76 82 $viewer = $this->requireViewer(); 77 83 78 84 $list = new PHUIObjectItemListView();
+6 -2
src/applications/phame/query/PhamePostSearchEngine.php
··· 86 86 return parent::buildSavedQueryFromBuiltin($query_key); 87 87 } 88 88 89 - 89 + /** 90 + * @param array<PhamePost> $posts 91 + * @param PhabricatorSavedQuery $query 92 + * @param array<PhabricatorObjectHandle> $handles 93 + */ 90 94 protected function renderResultList( 91 95 array $posts, 92 96 PhabricatorSavedQuery $query, 93 97 array $handles) { 94 98 95 - assert_instances_of($posts, 'PhamePost'); 99 + assert_instances_of($posts, PhamePost::class); 96 100 $viewer = $this->requireViewer(); 97 101 98 102 $list = new PHUIObjectItemListView();
+4 -1
src/applications/phame/view/PhameBlogListView.php
··· 4 4 5 5 private $blogs; 6 6 7 + /** 8 + * @param array<PhameBlog> $blogs 9 + */ 7 10 public function setBlogs($blogs) { 8 - assert_instances_of($blogs, 'PhameBlog'); 11 + assert_instances_of($blogs, PhameBlog::class); 9 12 $this->blogs = $blogs; 10 13 return $this; 11 14 }
+8 -2
src/applications/phame/view/PhameDraftListView.php
··· 5 5 private $posts; 6 6 private $blogs; 7 7 8 + /** 9 + * @param array<PhamePost> $posts 10 + */ 8 11 public function setPosts($posts) { 9 - assert_instances_of($posts, 'PhamePost'); 12 + assert_instances_of($posts, PhamePost::class); 10 13 $this->posts = $posts; 11 14 return $this; 12 15 } 13 16 17 + /** 18 + * @param array<PhameBlog> $blogs 19 + */ 14 20 public function setBlogs($blogs) { 15 - assert_instances_of($blogs, 'PhameBlog'); 21 + assert_instances_of($blogs, PhameBlog::class); 16 22 $this->blogs = $blogs; 17 23 return $this; 18 24 }
+4 -1
src/applications/phame/view/PhamePostListView.php
··· 8 8 private $isExternal; 9 9 private $isLive; 10 10 11 + /** 12 + * @param array<PhamePost> $posts 13 + */ 11 14 public function setPosts($posts) { 12 - assert_instances_of($posts, 'PhamePost'); 15 + assert_instances_of($posts, PhamePost::class); 13 16 $this->posts = $posts; 14 17 return $this; 15 18 }
+1 -1
src/applications/pholio/query/PholioMockSearchEngine.php
··· 86 86 /** 87 87 * @param array<PholioMock> $mocks 88 88 * @param PhabricatorSavedQuery $query 89 - * @param array $handles 89 + * @param array<PhabricatorObjectHandle> $handles 90 90 */ 91 91 protected function renderResultList( 92 92 array $mocks,
+6 -1
src/applications/phrequent/query/PhrequentSearchEngine.php
··· 119 119 )); 120 120 } 121 121 122 + /** 123 + * @param array<PhrequentUserTime> $usertimes 124 + * @param PhabricatorSavedQuery $query 125 + * @param array<PhabricatorObjectHandle> $handles 126 + */ 122 127 protected function renderResultList( 123 128 array $usertimes, 124 129 PhabricatorSavedQuery $query, 125 130 array $handles) { 126 - assert_instances_of($usertimes, 'PhrequentUserTime'); 131 + assert_instances_of($usertimes, PhrequentUserTime::class); 127 132 $viewer = $this->requireViewer(); 128 133 129 134 $view = id(new PHUIObjectItemListView())
+4 -1
src/applications/phrequent/storage/PhrequentTimeBlock.php
··· 4 4 5 5 private $events; 6 6 7 + /** 8 + * @param array<PhrequentUserTime> $events 9 + */ 7 10 public function __construct(array $events) { 8 - assert_instances_of($events, 'PhrequentUserTime'); 11 + assert_instances_of($events, PhrequentUserTime::class); 9 12 $this->events = $events; 10 13 } 11 14
+6 -1
src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php
··· 91 91 return parent::buildSavedQueryFromBuiltin($query_key); 92 92 } 93 93 94 + /** 95 + * @param array<PhabricatorPhurlURL> $urls 96 + * @param PhabricatorSavedQuery $query 97 + * @param array<PhabricatorObjectHandle> $handles 98 + */ 94 99 protected function renderResultList( 95 100 array $urls, 96 101 PhabricatorSavedQuery $query, 97 102 array $handles) { 98 103 99 - assert_instances_of($urls, 'PhabricatorPhurlURL'); 104 + assert_instances_of($urls, PhabricatorPhurlURL::class); 100 105 $viewer = $this->requireViewer(); 101 106 $list = new PHUIObjectItemListView(); 102 107 $handles = $viewer->loadHandles(mpull($urls, 'getAuthorPHID'));
+4 -1
src/applications/policy/filter/PhabricatorPolicyFilter.php
··· 155 155 return $this; 156 156 } 157 157 158 + /** 159 + * @param array<PhabricatorPolicyInterface> $objects 160 + */ 158 161 public function apply(array $objects) { 159 - assert_instances_of($objects, 'PhabricatorPolicyInterface'); 162 + assert_instances_of($objects, PhabricatorPolicyInterface::class); 160 163 161 164 $viewer = $this->viewer; 162 165 $capabilities = $this->capabilities;
+6 -1
src/applications/policy/filter/PhabricatorPolicyFilterSet.php
··· 102 102 $this->queue = array(); 103 103 } 104 104 105 + /** 106 + * @param PhabricatorUser $viewer 107 + * @param array<PhabricatorObjectHandle> $handles 108 + * @param array<PhabricatorPolicyInterface> $objects 109 + */ 105 110 public static function loadHandleViewCapabilities( 106 111 $viewer, 107 112 $handles, ··· 111 116 PhabricatorPolicyCapability::CAN_VIEW, 112 117 ); 113 118 114 - assert_instances_of($objects, 'PhabricatorPolicyInterface'); 119 + assert_instances_of($objects, PhabricatorPolicyInterface::class); 115 120 116 121 if (!$objects) { 117 122 return;
+6 -1
src/applications/ponder/query/PonderQuestionSearchEngine.php
··· 109 109 return mpull($questions, 'getAuthorPHID'); 110 110 } 111 111 112 + /** 113 + * @param array<PonderQuestion> $questions 114 + * @param PhabricatorSavedQuery $query 115 + * @param array<PhabricatorObjectHandle> $handles 116 + */ 112 117 protected function renderResultList( 113 118 array $questions, 114 119 PhabricatorSavedQuery $query, 115 120 array $handles) { 116 - assert_instances_of($questions, 'PonderQuestion'); 121 + assert_instances_of($questions, PonderQuestion::class); 117 122 118 123 $viewer = $this->requireViewer(); 119 124
+4 -1
src/applications/ponder/storage/PonderQuestion.php
··· 114 114 return '/'.$this->getMonogram(); 115 115 } 116 116 117 + /** 118 + * @param array<PonderAnswer> $answers 119 + */ 117 120 public function attachAnswers(array $answers) { 118 - assert_instances_of($answers, 'PonderAnswer'); 121 + assert_instances_of($answers, PonderAnswer::class); 119 122 $this->answers = $answers; 120 123 return $this; 121 124 }
+4 -1
src/applications/project/chart/PhabricatorProjectActivityChartEngine.php
··· 5 5 6 6 const CHARTENGINEKEY = 'project.activity'; 7 7 8 + /** 9 + * @param array<PhabricatorProject> $projects 10 + */ 8 11 public function setProjects(array $projects) { 9 - assert_instances_of($projects, 'PhabricatorProject'); 12 + assert_instances_of($projects, PhabricatorProject::class); 10 13 $project_phids = mpull($projects, 'getPHID'); 11 14 return $this->setEngineParameter('projectPHIDs', $project_phids); 12 15 }
+1 -1
src/applications/project/chart/PhabricatorProjectBurndownChartEngine.php
··· 9 9 * @param array<PhabricatorProject> $projects 10 10 */ 11 11 public function setProjects(array $projects) { 12 - assert_instances_of($projects, 'PhabricatorProject'); 12 + assert_instances_of($projects, PhabricatorProject::class); 13 13 $project_phids = mpull($projects, 'getPHID'); 14 14 return $this->setEngineParameter('projectPHIDs', $project_phids); 15 15 }
+4 -1
src/applications/project/conduit/ProjectConduitAPIMethod.php
··· 11 11 return idx($results, $project->getPHID()); 12 12 } 13 13 14 + /** 15 + * @param array<PhabricatorProject> $projects 16 + */ 14 17 protected function buildProjectInfoDictionaries(array $projects) { 15 - assert_instances_of($projects, 'PhabricatorProject'); 18 + assert_instances_of($projects, PhabricatorProject::class); 16 19 if (!$projects) { 17 20 return array(); 18 21 }
+5 -1
src/applications/project/controller/PhabricatorProjectBoardManageController.php
··· 98 98 return $curtain; 99 99 } 100 100 101 + /** 102 + * @param PhabricatorProject $board 103 + * @param array<PhabricatorProjectColumn> $columns 104 + */ 101 105 private function buildColumnsList( 102 106 PhabricatorProject $board, 103 107 array $columns) { 104 - assert_instances_of($columns, 'PhabricatorProjectColumn'); 108 + assert_instances_of($columns, PhabricatorProjectColumn::class); 105 109 106 110 $board_id = $board->getID(); 107 111
+4 -1
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 182 182 return $view; 183 183 } 184 184 185 + /** 186 + * @param array<PhabricatorFeedStory> $stories 187 + */ 185 188 private function renderStories(array $stories) { 186 - assert_instances_of($stories, 'PhabricatorFeedStory'); 189 + assert_instances_of($stories, PhabricatorFeedStory::class); 187 190 188 191 $builder = new PhabricatorFeedBuilder($stories); 189 192 $builder->setUser($this->getRequest()->getUser());
+2 -2
src/applications/project/order/PhabricatorProjectColumnOrder.php
··· 67 67 $result = array(); 68 68 } 69 69 70 - assert_instances_of($result, 'PhabricatorApplicationTransaction'); 70 + assert_instances_of($result, PhabricatorApplicationTransaction::class); 71 71 72 72 return $result; 73 73 } ··· 108 108 phutil_describe_type($headers))); 109 109 } 110 110 111 - assert_instances_of($headers, 'PhabricatorProjectColumnHeader'); 111 + assert_instances_of($headers, PhabricatorProjectColumnHeader::class); 112 112 113 113 // Add a "0" to the end of each header. This makes them sort above object 114 114 // cards in the same group.
+6 -1
src/applications/project/query/PhabricatorProjectColumnSearchEngine.php
··· 65 65 return parent::buildSavedQueryFromBuiltin($query_key); 66 66 } 67 67 68 + /** 69 + * @param array<PhabricatorProjectColumn> $projects 70 + * @param PhabricatorSavedQuery $query 71 + * @param array<PhabricatorObjectHandle> $handles 72 + */ 68 73 protected function renderResultList( 69 74 array $projects, 70 75 PhabricatorSavedQuery $query, 71 76 array $handles) { 72 - assert_instances_of($projects, 'PhabricatorProjectColumn'); 77 + assert_instances_of($projects, PhabricatorProjectColumn::class); 73 78 $viewer = $this->requireViewer(); 74 79 75 80 return null;
+6 -1
src/applications/project/query/PhabricatorProjectSearchEngine.php
··· 325 325 return $options; 326 326 } 327 327 328 + /** 329 + * @param array<PhabricatorProject> $projects 330 + * @param PhabricatorSavedQuery $query 331 + * @param array<PhabricatorObjectHandle> $handles 332 + */ 328 333 protected function renderResultList( 329 334 array $projects, 330 335 PhabricatorSavedQuery $query, 331 336 array $handles) { 332 - assert_instances_of($projects, 'PhabricatorProject'); 337 + assert_instances_of($projects, PhabricatorProject::class); 333 338 $viewer = $this->requireViewer(); 334 339 335 340 $list = id(new PhabricatorProjectListView())
+6 -1
src/applications/project/query/PhabricatorProjectTriggerSearchEngine.php
··· 69 69 return parent::buildSavedQueryFromBuiltin($query_key); 70 70 } 71 71 72 + /** 73 + * @param array<PhabricatorProjectTrigger> $triggers 74 + * @param PhabricatorSavedQuery $query 75 + * @param array<PhabricatorObjectHandle> $handles 76 + */ 72 77 protected function renderResultList( 73 78 array $triggers, 74 79 PhabricatorSavedQuery $query, 75 80 array $handles) { 76 - assert_instances_of($triggers, 'PhabricatorProjectTrigger'); 81 + assert_instances_of($triggers, PhabricatorProjectTrigger::class); 77 82 $viewer = $this->requireViewer(); 78 83 79 84 $example_phids = array();
+4 -1
src/applications/remarkup/engineextension/PhabricatorRemarkupHyperlinkEngineExtension.php
··· 3 3 abstract class PhabricatorRemarkupHyperlinkEngineExtension 4 4 extends PhutilRemarkupHyperlinkEngineExtension { 5 5 6 + /** 7 + * @param array<PhutilRemarkupHyperlinkRef> $hyperlinks 8 + */ 6 9 final protected function getSelfLinks(array $hyperlinks) { 7 - assert_instances_of($hyperlinks, 'PhutilRemarkupHyperlinkRef'); 10 + assert_instances_of($hyperlinks, PhutilRemarkupHyperlinkRef::class); 8 11 9 12 $allowed_protocols = array( 10 13 'http' => true,
+3 -3
src/applications/search/compiler/PhutilSearchQueryCompiler.php
··· 63 63 * @return string|null 64 64 */ 65 65 public function compileQuery(array $tokens) { 66 - assert_instances_of($tokens, 'PhutilSearchQueryToken'); 66 + assert_instances_of($tokens, PhutilSearchQueryToken::class); 67 67 68 68 $result = array(); 69 69 foreach ($tokens as $token) { ··· 78 78 * @return string|null 79 79 */ 80 80 public function compileLiteralQuery(array $tokens) { 81 - assert_instances_of($tokens, 'PhutilSearchQueryToken'); 81 + assert_instances_of($tokens, PhutilSearchQueryToken::class); 82 82 83 83 $result = array(); 84 84 foreach ($tokens as $token) { ··· 96 96 * @return string|null 97 97 */ 98 98 public function compileStemmedQuery(array $tokens) { 99 - assert_instances_of($tokens, 'PhutilSearchQueryToken'); 99 + assert_instances_of($tokens, PhutilSearchQueryToken::class); 100 100 101 101 $result = array(); 102 102 foreach ($tokens as $token) {
+4 -2
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 104 104 * @param array<PHUIListItemView> $navigation_items 105 105 */ 106 106 public function setNavigationItems(array $navigation_items) { 107 - assert_instances_of($navigation_items, 'PHUIListItemView'); 107 + assert_instances_of($navigation_items, PHUIListItemView::class); 108 108 $this->navigationItems = $navigation_items; 109 109 return $this; 110 110 } ··· 1704 1704 * Load from object and from storage, and updates Custom Fields instances 1705 1705 * that are attached to each object. 1706 1706 * 1707 + * @param array<PhabricatorCustomFieldInterface> $objects 1708 + * @param string $role One of the PhabricatorCustomField::ROLE_ constants 1707 1709 * @return array<string, PhabricatorCustomFieldList> Map of loaded fields 1708 1710 * (PHID to PhabricatorCustomFieldList). 1709 1711 * @task custom 1710 1712 */ 1711 1713 protected function loadCustomFields(array $objects, $role) { 1712 - assert_instances_of($objects, 'PhabricatorCustomFieldInterface'); 1714 + assert_instances_of($objects, PhabricatorCustomFieldInterface::class); 1713 1715 1714 1716 $query = new PhabricatorCustomFieldStorageQuery(); 1715 1717 $lists = array();
+5 -1
src/applications/search/engine/PhabricatorProfileMenuItemViewList.php
··· 169 169 return $navigation; 170 170 } 171 171 172 + /** 173 + * @param array<PHUIListItemView> $items 174 + * @param ?PHUIListItemView $selected_item 175 + */ 172 176 private function getHighlightedItemKey( 173 177 array $items, 174 178 ?PHUIListItemView $selected_item = null) { 175 179 176 - assert_instances_of($items, 'PHUIListItemView'); 180 + assert_instances_of($items, PHUIListItemView::class); 177 181 178 182 $default_key = null; 179 183 if ($selected_item) {
+5 -1
src/applications/search/menuitem/PhabricatorProfileMenuItem.php
··· 72 72 73 73 public function willGetMenuItemViewList(array $items) {} 74 74 75 + /** 76 + * @param PhabricatorProfileMenuItemConfiguration $config 77 + * @param array<PhabricatorProfileMenuItemView> $list 78 + */ 75 79 final public function getMenuItemViewList( 76 80 PhabricatorProfileMenuItemConfiguration $config) { 77 81 $list = $this->newMenuItemViewList($config); ··· 85 89 phutil_describe_type($list))); 86 90 } 87 91 88 - assert_instances_of($list, 'PhabricatorProfileMenuItemView'); 92 + assert_instances_of($list, PhabricatorProfileMenuItemView::class); 89 93 90 94 foreach ($list as $view) { 91 95 $view->setMenuItemConfiguration($config);
+4 -1
src/applications/search/relationship/PhabricatorObjectRelationshipList.php
··· 32 32 return $this->object; 33 33 } 34 34 35 + /** 36 + * @param array<PhabricatorObjectRelationship> $relationships 37 + */ 35 38 public function setRelationships(array $relationships) { 36 - assert_instances_of($relationships, 'PhabricatorObjectRelationship'); 39 + assert_instances_of($relationships, PhabricatorObjectRelationship::class); 37 40 $this->relationships = $relationships; 38 41 return $this; 39 42 }
+4 -1
src/applications/search/view/PhabricatorApplicationSearchResultView.php
··· 77 77 return $this; 78 78 } 79 79 80 + /** 81 + * @param array<PHUICrumbView> $crumbs 82 + */ 80 83 public function setCrumbs(array $crumbs) { 81 - assert_instances_of($crumbs, 'PHUICrumbView'); 84 + assert_instances_of($crumbs, PHUICrumbView::class); 82 85 83 86 $this->crumbs = $crumbs; 84 87 return $this;
+1 -1
src/applications/search/view/PhabricatorSearchResultView.php
··· 16 16 * @return $this 17 17 */ 18 18 public function setTokens(array $tokens) { 19 - assert_instances_of($tokens, 'PhabricatorFulltextToken'); 19 + assert_instances_of($tokens, PhabricatorFulltextToken::class); 20 20 $this->tokens = $tokens; 21 21 return $this; 22 22 }
+4 -1
src/applications/settings/query/PhabricatorUserPreferencesQuery.php
··· 34 34 return $this; 35 35 } 36 36 37 + /** 38 + * @param array<PhabricatorUser> $users 39 + */ 37 40 public function withUsers(array $users) { 38 - assert_instances_of($users, 'PhabricatorUser'); 41 + assert_instances_of($users, PhabricatorUser::class); 39 42 $this->users = mpull($users, null, 'getPHID'); 40 43 $this->withUserPHIDs(array_keys($this->users)); 41 44 return $this;
+6 -1
src/applications/settings/query/PhabricatorUserPreferencesSearchEngine.php
··· 50 50 return parent::buildSavedQueryFromBuiltin($query_key); 51 51 } 52 52 53 + /** 54 + * @param array<PhabricatorUserPreferences> $settings 55 + * @param PhabricatorSavedQuery $query 56 + * @param array<PhabricatorObjectHandle> $handles 57 + */ 53 58 protected function renderResultList( 54 59 array $settings, 55 60 PhabricatorSavedQuery $query, 56 61 array $handles) { 57 - assert_instances_of($settings, 'PhabricatorUserPreferences'); 62 + assert_instances_of($settings, PhabricatorUserPreferences::class); 58 63 59 64 $viewer = $this->requireViewer(); 60 65
+4 -1
src/applications/slowvote/query/PhabricatorSlowvoteQuery.php
··· 60 60 return new PhabricatorSlowvotePoll(); 61 61 } 62 62 63 + /** 64 + * @param array<PhabricatorSlowvotePoll> $polls 65 + */ 63 66 protected function willFilterPage(array $polls) { 64 - assert_instances_of($polls, 'PhabricatorSlowvotePoll'); 67 + assert_instances_of($polls, PhabricatorSlowvotePoll::class); 65 68 66 69 $ids = mpull($polls, 'getID'); 67 70 $viewer = $this->getViewer();
+6 -1
src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php
··· 106 106 return mpull($polls, 'getAuthorPHID'); 107 107 } 108 108 109 + /** 110 + * @param array<PhabricatorSlowvotePoll> $polls 111 + * @param PhabricatorSavedQuery $query 112 + * @param array<PhabricatorObjectHandle> $handles 113 + */ 109 114 protected function renderResultList( 110 115 array $polls, 111 116 PhabricatorSavedQuery $query, 112 117 array $handles) { 113 118 114 - assert_instances_of($polls, 'PhabricatorSlowvotePoll'); 119 + assert_instances_of($polls, PhabricatorSlowvotePoll::class); 115 120 $viewer = $this->requireViewer(); 116 121 117 122 $list = id(new PHUIObjectItemListView())
+13 -3
src/applications/slowvote/storage/PhabricatorSlowvotePoll.php
··· 80 80 return $this->assertAttached($this->options); 81 81 } 82 82 83 + /** 84 + * @param array<PhabricatorSlowvoteOption> $options 85 + */ 83 86 public function attachOptions(array $options) { 84 - assert_instances_of($options, 'PhabricatorSlowvoteOption'); 87 + assert_instances_of($options, PhabricatorSlowvoteOption::class); 85 88 $this->options = $options; 86 89 return $this; 87 90 } ··· 90 93 return $this->assertAttached($this->choices); 91 94 } 92 95 96 + /** 97 + * @param array<PhabricatorSlowvoteChoice> $choices 98 + */ 93 99 public function attachChoices(array $choices) { 94 - assert_instances_of($choices, 'PhabricatorSlowvoteChoice'); 100 + assert_instances_of($choices, PhabricatorSlowvoteChoice::class); 95 101 $this->choices = $choices; 96 102 return $this; 97 103 } ··· 100 106 return $this->assertAttachedKey($this->viewerChoices, $viewer->getPHID()); 101 107 } 102 108 109 + /** 110 + * @param PhabricatorUser $viewer 111 + * @param array<PhabricatorSlowvoteChoice> $choices 112 + */ 103 113 public function attachViewerChoices(PhabricatorUser $viewer, array $choices) { 104 114 if ($this->viewerChoices === self::ATTACHABLE) { 105 115 $this->viewerChoices = array(); 106 116 } 107 - assert_instances_of($choices, 'PhabricatorSlowvoteChoice'); 117 + assert_instances_of($choices, PhabricatorSlowvoteChoice::class); 108 118 $this->viewerChoices[$viewer->getPHID()] = $choices; 109 119 return $this; 110 120 }
+6 -1
src/applications/spaces/query/PhabricatorSpacesNamespaceSearchEngine.php
··· 64 64 return parent::buildSavedQueryFromBuiltin($query_key); 65 65 } 66 66 67 + /** 68 + * @param array<PhabricatorSpacesNamespace> $spaces 69 + * @param PhabricatorSavedQuery $query 70 + * @param array<PhabricatorObjectHandle> $handles 71 + */ 67 72 protected function renderResultList( 68 73 array $spaces, 69 74 PhabricatorSavedQuery $query, 70 75 array $handles) { 71 - assert_instances_of($spaces, 'PhabricatorSpacesNamespace'); 76 + assert_instances_of($spaces, PhabricatorSpacesNamespace::class); 72 77 73 78 $viewer = $this->requireViewer(); 74 79
+4 -1
src/applications/subscriptions/view/SubscriptionListStringBuilder.php
··· 5 5 private $handles; 6 6 private $objectPHID; 7 7 8 + /** 9 + * @param array<PhabricatorObjectHandle> $handles 10 + */ 8 11 public function setHandles(array $handles) { 9 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 12 + assert_instances_of($handles, PhabricatorObjectHandle::class); 10 13 $this->handles = $handles; 11 14 return $this; 12 15 }
+8 -2
src/applications/tokens/conduit/TokenConduitAPIMethod.php
··· 10 10 return self::METHOD_STATUS_UNSTABLE; 11 11 } 12 12 13 + /** 14 + * @param array<PhabricatorToken> $tokens 15 + */ 13 16 public function buildTokenDicts(array $tokens) { 14 - assert_instances_of($tokens, 'PhabricatorToken'); 17 + assert_instances_of($tokens, PhabricatorToken::class); 15 18 16 19 $list = array(); 17 20 foreach ($tokens as $token) { ··· 25 28 return $list; 26 29 } 27 30 31 + /** 32 + * @param array<PhabricatorTokenGiven> $tokens_given 33 + */ 28 34 public function buildTokenGivenDicts(array $tokens_given) { 29 - assert_instances_of($tokens_given, 'PhabricatorTokenGiven'); 35 + assert_instances_of($tokens_given, PhabricatorTokenGiven::class); 30 36 31 37 $list = array(); 32 38 foreach ($tokens_given as $given) {
+5 -1
src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php
··· 283 283 return array($engine, $queries); 284 284 } 285 285 286 + /** 287 + * @param PhabricatorApplicationSearchEngine $engine 288 + * @param array<PhabricatorSavedQuery> $queries 289 + */ 286 290 private function newUnionQuery( 287 291 PhabricatorApplicationSearchEngine $engine, 288 292 array $queries) { 289 293 290 - assert_instances_of($queries, 'PhabricatorSavedQuery'); 294 + assert_instances_of($queries, PhabricatorSavedQuery::class); 291 295 292 296 $engine = clone $engine; 293 297
+5 -1
src/applications/transactions/draft/PhabricatorDraftEngine.php
··· 95 95 $editor->save(); 96 96 } 97 97 98 + /** 99 + * @param PhabricatorUser $viewer 100 + * @param array<PhabricatorDraftInterface> $objects 101 + */ 98 102 final public static function attachDrafts( 99 103 PhabricatorUser $viewer, 100 104 array $objects) { 101 - assert_instances_of($objects, 'PhabricatorDraftInterface'); 105 + assert_instances_of($objects, PhabricatorDraftInterface::class); 102 106 103 107 $viewer_phid = $viewer->getPHID(); 104 108
+5 -3
src/applications/transactions/editengine/PhabricatorEditEngine.php
··· 203 203 $template_object); 204 204 205 205 // TODO: Validate this in more detail with a more tailored error. 206 - assert_instances_of($extension_fields, 'PhabricatorEditField'); 206 + assert_instances_of($extension_fields, PhabricatorEditField::class); 207 207 208 208 foreach ($extension_fields as $field) { 209 209 $field ··· 480 480 get_class($this))); 481 481 } 482 482 483 - assert_instances_of($configurations, 'PhabricatorEditEngineConfiguration'); 483 + assert_instances_of( 484 + $configurations, 485 + PhabricatorEditEngineConfiguration::class); 484 486 485 487 $has_default = false; 486 488 foreach ($configurations as $config) { ··· 2491 2493 if ($this->pages === null) { 2492 2494 $pages = $this->newPages($object); 2493 2495 2494 - assert_instances_of($pages, 'PhabricatorEditPage'); 2496 + assert_instances_of($pages, PhabricatorEditPage::class); 2495 2497 $pages = mpull($pages, null, 'getKey'); 2496 2498 2497 2499 $this->pages = $pages;
+4 -1
src/applications/transactions/editengine/PhabricatorEditEngineSubtypeMap.php
··· 7 7 private $subtypes; 8 8 private $datasource; 9 9 10 + /** 11 + * @param array<PhabricatorEditEngineSubtype> $subtypes 12 + */ 10 13 public function __construct(array $subtypes) { 11 - assert_instances_of($subtypes, 'PhabricatorEditEngineSubtype'); 14 + assert_instances_of($subtypes, PhabricatorEditEngineSubtype::class); 12 15 13 16 $this->subtypes = $subtypes; 14 17 }
+21 -6
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 1756 1756 } 1757 1757 } 1758 1758 1759 + /** 1760 + * @param PhabricatorLiskDAO $object 1761 + * @param array<PhabricatorApplicationTransaction> $xactions 1762 + */ 1759 1763 private function validateEditParameters( 1760 1764 PhabricatorLiskDAO $object, 1761 1765 array $xactions) { ··· 1770 1774 1771 1775 $types = array_fill_keys($this->getTransactionTypes(), true); 1772 1776 1773 - assert_instances_of($xactions, 'PhabricatorApplicationTransaction'); 1777 + assert_instances_of($xactions, PhabricatorApplicationTransaction::class); 1774 1778 foreach ($xactions as $xaction) { 1775 1779 if ($xaction->getPHID() || $xaction->getID()) { 1776 1780 throw new PhabricatorApplicationTransactionStructureException( ··· 1841 1845 } 1842 1846 } 1843 1847 1848 + /** 1849 + * @param PhabricatorLiskDAO $object 1850 + * @param array<PhabricatorApplicationTransaction> $xactions 1851 + */ 1844 1852 private function applyCapabilityChecks( 1845 1853 PhabricatorLiskDAO $object, 1846 1854 array $xactions) { 1847 - assert_instances_of($xactions, 'PhabricatorApplicationTransaction'); 1855 + assert_instances_of($xactions, PhabricatorApplicationTransaction::class); 1848 1856 1849 1857 $can_edit = PhabricatorPolicyCapability::CAN_EDIT; 1850 1858 ··· 2254 2262 return $xactions; 2255 2263 } 2256 2264 2257 - 2265 + /** 2266 + * @param PhabricatorLiskDAO $object 2267 + * @param array<PhabricatorApplicationTransaction> $xactions 2268 + * @param array<PhabricatorTransactionRemarkupChange> $remarkup_changes 2269 + * @return PhabricatorApplicationTransaction 2270 + */ 2258 2271 private function newFileTransaction( 2259 2272 PhabricatorLiskDAO $object, 2260 2273 array $xactions, ··· 2262 2275 2263 2276 assert_instances_of( 2264 2277 $remarkup_changes, 2265 - 'PhabricatorTransactionRemarkupChange'); 2278 + PhabricatorTransactionRemarkupChange::class); 2266 2279 2267 2280 $new_map = array(); 2268 2281 ··· 4340 4353 } 4341 4354 4342 4355 $apply_xactions = $this->didApplyHeraldRules($object, $adapter, $xscript); 4343 - assert_instances_of($apply_xactions, 'PhabricatorApplicationTransaction'); 4356 + assert_instances_of( 4357 + $apply_xactions, 4358 + PhabricatorApplicationTransaction::class); 4344 4359 4345 4360 $queue_xactions = $adapter->getQueuedTransactions(); 4346 4361 ··· 5718 5733 5719 5734 assert_instances_of( 5720 5735 $extension_errors, 5721 - 'PhabricatorApplicationTransactionValidationError'); 5736 + PhabricatorApplicationTransactionValidationError::class); 5722 5737 5723 5738 $errors[] = $extension_errors; 5724 5739 }
+4 -1
src/applications/transactions/engine/PhabricatorTimelineEngine.php
··· 39 39 return $this->object; 40 40 } 41 41 42 + /** 43 + * @param array<PhabricatorApplicationTransaction> $xactions 44 + */ 42 45 final public function setTransactions(array $xactions) { 43 - assert_instances_of($xactions, 'PhabricatorApplicationTransaction'); 46 + assert_instances_of($xactions, PhabricatorApplicationTransaction::class); 44 47 $this->xactions = $xactions; 45 48 return $this; 46 49 }
+8 -1
src/applications/transactions/exception/PhabricatorApplicationTransactionNoEffectException.php
··· 7 7 private $anyEffect; 8 8 private $hasComment; 9 9 10 + /** 11 + * @param array<PhabricatorApplicationTransaction> $transactions 12 + * @param bool $any_effect 13 + * @param bool $has_comment 14 + */ 10 15 public function __construct(array $transactions, $any_effect, $has_comment) { 11 - assert_instances_of($transactions, 'PhabricatorApplicationTransaction'); 16 + assert_instances_of( 17 + $transactions, 18 + PhabricatorApplicationTransaction::class); 12 19 13 20 $this->transactions = $transactions; 14 21 $this->anyEffect = $any_effect;
+4 -1
src/applications/transactions/exception/PhabricatorApplicationTransactionValidationException.php
··· 5 5 6 6 private $errors; 7 7 8 + /** 9 + * @param array<PhabricatorApplicationTransactionValidationError> $errors 10 + */ 8 11 public function __construct(array $errors) { 9 12 assert_instances_of( 10 13 $errors, 11 - 'PhabricatorApplicationTransactionValidationError'); 14 + PhabricatorApplicationTransactionValidationError::class); 12 15 13 16 $this->errors = $errors; 14 17
+6 -1
src/applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php
··· 100 100 return parent::buildSavedQueryFromBuiltin($query_key); 101 101 } 102 102 103 + /** 104 + * @param array<PhabricatorEditEngineConfiguration> $configs 105 + * @param PhabricatorSavedQuery $query 106 + * @param array<PhabricatorObjectHandle> $handles 107 + */ 103 108 protected function renderResultList( 104 109 array $configs, 105 110 PhabricatorSavedQuery $query, 106 111 array $handles) { 107 - assert_instances_of($configs, 'PhabricatorEditEngineConfiguration'); 112 + assert_instances_of($configs, PhabricatorEditEngineConfiguration::class); 108 113 $viewer = $this->requireViewer(); 109 114 $engine_key = $this->getEngineKey(); 110 115
+6 -1
src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php
··· 56 56 return parent::buildSavedQueryFromBuiltin($query_key); 57 57 } 58 58 59 + /** 60 + * @param array<PhabricatorEditEngine> $engines 61 + * @param PhabricatorSavedQuery $query 62 + * @param array<PhabricatorObjectHandle> $handles 63 + */ 59 64 protected function renderResultList( 60 65 array $engines, 61 66 PhabricatorSavedQuery $query, 62 67 array $handles) { 63 - assert_instances_of($engines, 'PhabricatorEditEngine'); 68 + assert_instances_of($engines, PhabricatorEditEngine::class); 64 69 $viewer = $this->requireViewer(); 65 70 66 71 $list = id(new PHUIObjectItemListView())
+6 -1
src/applications/transactions/response/PhabricatorApplicationTransactionResponse.php
··· 14 14 return new AphrontAjaxResponse(); 15 15 } 16 16 17 + /** 18 + * @param array<PhabricatorApplicationTransaction> $transactions 19 + */ 17 20 public function setTransactions($transactions) { 18 - assert_instances_of($transactions, 'PhabricatorApplicationTransaction'); 21 + assert_instances_of( 22 + $transactions, 23 + PhabricatorApplicationTransaction::class); 19 24 20 25 $this->transactions = $transactions; 21 26 return $this;
+4 -1
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 217 217 218 218 public function getRemarkupChanges() { 219 219 $changes = $this->newRemarkupChanges(); 220 - assert_instances_of($changes, 'PhabricatorTransactionRemarkupChange'); 220 + assert_instances_of($changes, PhabricatorTransactionRemarkupChange::class); 221 221 222 222 // Convert older-style remarkup blocks into newer-style remarkup changes. 223 223 // This builds changes that do not have the correct "old value", so rules ··· 1674 1674 ->setNewText($new); 1675 1675 } 1676 1676 1677 + /** 1678 + * @param array<PhabricatorApplicationTransaction> $group 1679 + */ 1677 1680 public function attachTransactionGroup(array $group) { 1678 1681 assert_instances_of($group, self::class); 1679 1682 $this->transactionGroup = $group;
+12 -2
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 127 127 return $this->infoView; 128 128 } 129 129 130 + /** 131 + * @param array<PhabricatorEditEngineCommentAction> $comment_actions 132 + */ 130 133 public function setCommentActions(array $comment_actions) { 131 - assert_instances_of($comment_actions, 'PhabricatorEditEngineCommentAction'); 134 + assert_instances_of( 135 + $comment_actions, 136 + PhabricatorEditEngineCommentAction::class); 132 137 $this->commentActions = $comment_actions; 133 138 return $this; 134 139 } ··· 137 142 return $this->commentActions; 138 143 } 139 144 145 + /** 146 + * @param array<PhabricatorEditEngineCommentActionGroup> $groups 147 + */ 140 148 public function setCommentActionGroups(array $groups) { 141 - assert_instances_of($groups, 'PhabricatorEditEngineCommentActionGroup'); 149 + assert_instances_of( 150 + $groups, 151 + PhabricatorEditEngineCommentActionGroup::class); 142 152 $this->commentActionGroups = $groups; 143 153 return $this; 144 154 }
+5 -1
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 84 84 return $this; 85 85 } 86 86 87 + /** 88 + * @param array<PhabricatorApplicationTransaction> $transactions 89 + */ 87 90 public function setTransactions(array $transactions) { 88 - assert_instances_of($transactions, 'PhabricatorApplicationTransaction'); 91 + assert_instances_of($transactions, 92 + PhabricatorApplicationTransaction::class); 89 93 $this->transactions = $transactions; 90 94 return $this; 91 95 }
+6 -1
src/applications/xhprof/query/PhabricatorXHProfSampleSearchEngine.php
··· 49 49 return parent::buildSavedQueryFromBuiltin($query_key); 50 50 } 51 51 52 + /** 53 + * @param array<PhabricatorXHProfSample> $samples 54 + * @param PhabricatorSavedQuery $query 55 + * @param array<PhabricatorObjectHandle> $handles 56 + */ 52 57 protected function renderResultList( 53 58 array $samples, 54 59 PhabricatorSavedQuery $query, 55 60 array $handles) { 56 - assert_instances_of($samples, 'PhabricatorXHProfSample'); 61 + assert_instances_of($samples, PhabricatorXHProfSample::class); 57 62 58 63 $viewer = $this->requireViewer(); 59 64
+2 -2
src/infrastructure/cache/PhutilKeyValueCacheStack.php
··· 38 38 /** 39 39 * Set the caches which comprise this stack. 40 40 * 41 - * @param list<PhutilKeyValueCache> $caches Ordered list of key-value 41 + * @param array<PhutilKeyValueCache> $caches Ordered list of key-value 42 42 * caches. 43 43 * @return $this 44 44 * @task config 45 45 */ 46 46 public function setCaches(array $caches) { 47 - assert_instances_of($caches, 'PhutilKeyValueCache'); 47 + assert_instances_of($caches, parent::class); 48 48 $this->cachesForward = $caches; 49 49 $this->cachesBackward = array_reverse($caches); 50 50
+4 -1
src/infrastructure/customfield/field/PhabricatorCustomFieldList.php
··· 12 12 private $fields; 13 13 private $viewer; 14 14 15 + /** 16 + * @param array<PhabricatorCustomField> $fields 17 + */ 15 18 public function __construct(array $fields) { 16 - assert_instances_of($fields, 'PhabricatorCustomField'); 19 + assert_instances_of($fields, PhabricatorCustomField::class); 17 20 $this->fields = $fields; 18 21 } 19 22
+4 -1
src/infrastructure/customfield/query/PhabricatorCustomFieldStorageQuery.php
··· 12 12 private $fieldMap = array(); 13 13 private $storageSources = array(); 14 14 15 + /** 16 + * @param array<PhabricatorCustomField> $fields 17 + */ 15 18 public function addFields(array $fields) { 16 - assert_instances_of($fields, 'PhabricatorCustomField'); 19 + assert_instances_of($fields, PhabricatorCustomField::class); 17 20 18 21 foreach ($fields as $field) { 19 22 $this->addField($field);
+6 -1
src/infrastructure/daemon/workers/query/PhabricatorWorkerBulkJobSearchEngine.php
··· 71 71 return parent::buildSavedQueryFromBuiltin($query_key); 72 72 } 73 73 74 + /** 75 + * @param array<PhabricatorWorkerBulkJob> $jobs 76 + * @param PhabricatorSavedQuery $query 77 + * @param array<PhabricatorObjectHandle> $handles 78 + */ 74 79 protected function renderResultList( 75 80 array $jobs, 76 81 PhabricatorSavedQuery $query, 77 82 array $handles) { 78 - assert_instances_of($jobs, 'PhabricatorWorkerBulkJob'); 83 + assert_instances_of($jobs, PhabricatorWorkerBulkJob::class); 79 84 80 85 $viewer = $this->requireViewer(); 81 86
+12 -3
src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php
··· 18 18 return $this->viewer; 19 19 } 20 20 21 + /** 22 + * @param array<DifferentialInlineComment> $inlines 23 + */ 21 24 public function setInlines(array $inlines) { 22 - assert_instances_of($inlines, 'DifferentialInlineComment'); 25 + assert_instances_of($inlines, DifferentialInlineComment::class); 23 26 $this->inlines = $inlines; 24 27 return $this; 25 28 } ··· 28 31 return $this->inlines; 29 32 } 30 33 34 + /** 35 + * @param array<DifferentialChangeset> $old_changesets 36 + */ 31 37 public function setOldChangesets(array $old_changesets) { 32 - assert_instances_of($old_changesets, 'DifferentialChangeset'); 38 + assert_instances_of($old_changesets, DifferentialChangeset::class); 33 39 $this->oldChangesets = $old_changesets; 34 40 return $this; 35 41 } ··· 38 44 return $this->oldChangesets; 39 45 } 40 46 47 + /** 48 + * @param array<DifferentialChangeset> $new_changesets 49 + */ 41 50 public function setNewChangesets(array $new_changesets) { 42 - assert_instances_of($new_changesets, 'DifferentialChangeset'); 51 + assert_instances_of($new_changesets, DifferentialChangeset::class); 43 52 $this->newChangesets = $new_changesets; 44 53 return $this; 45 54 }
+4 -1
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
··· 15 15 return $this->getInlineComment()->isHidden(); 16 16 } 17 17 18 + /** 19 + * @param array<PhabricatorObjectHandle> $handles 20 + */ 18 21 public function setHandles(array $handles) { 19 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 22 + assert_instances_of($handles, PhabricatorObjectHandle::class); 20 23 $this->handles = $handles; 21 24 return $this; 22 25 }
+5 -1
src/infrastructure/diff/view/PHUIDiffInlineCommentPreviewListView.php
··· 6 6 private $inlineComments = array(); 7 7 private $ownerPHID; 8 8 9 + /** 10 + * @param array<PhabricatorApplicationTransactionComment> $comments 11 + */ 9 12 public function setInlineComments(array $comments) { 10 - assert_instances_of($comments, 'PhabricatorApplicationTransactionComment'); 13 + assert_instances_of($comments, 14 + PhabricatorApplicationTransactionComment::class); 11 15 $this->inlineComments = $comments; 12 16 return $this; 13 17 }
+4 -1
src/infrastructure/diff/view/PHUIDiffTableOfContentsItemView.php
··· 69 69 return $this->context; 70 70 } 71 71 72 + /** 73 + * @param array<PhabricatorOwnersPackage> $packages 74 + */ 72 75 public function setPackages(array $packages) { 73 - assert_instances_of($packages, 'PhabricatorOwnersPackage'); 76 + assert_instances_of($packages, PhabricatorOwnersPackage::class); 74 77 $this->packages = mpull($packages, null, 'getPHID'); 75 78 return $this; 76 79 }
+4 -1
src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php
··· 16 16 return $this; 17 17 } 18 18 19 + /** 20 + * @param array<PhabricatorOwnersPackage> $authority_packages 21 + */ 19 22 public function setAuthorityPackages(array $authority_packages) { 20 - assert_instances_of($authority_packages, 'PhabricatorOwnersPackage'); 23 + assert_instances_of($authority_packages, PhabricatorOwnersPackage::class); 21 24 $this->authorityPackages = $authority_packages; 22 25 return $this; 23 26 }
+4 -1
src/infrastructure/markup/blockrule/PhutilRemarkupBlockRule.php
··· 61 61 return $this->engine; 62 62 } 63 63 64 + /** 65 + * @param array<PhutilRemarkupRule> $rules 66 + */ 64 67 public function setMarkupRules(array $rules) { 65 - assert_instances_of($rules, 'PhutilRemarkupRule'); 68 + assert_instances_of($rules, PhutilRemarkupRule::class); 66 69 $this->rules = $rules; 67 70 $this->updateRules(); 68 71 return $this;
+4 -1
src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php
··· 50 50 return $this->setConfig('runtime.quote.depth', $depth); 51 51 } 52 52 53 + /** 54 + * @param array<PhutilRemarkupBlockRule> $rules 55 + */ 53 56 public function setBlockRules(array $rules) { 54 - assert_instances_of($rules, 'PhutilRemarkupBlockRule'); 57 + assert_instances_of($rules, PhutilRemarkupBlockRule::class); 55 58 56 59 $rules = msortv($rules, 'getPriorityVector'); 57 60
+3 -1
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 2620 2620 2621 2621 2622 2622 /** 2623 + * @param int $edge_type An edge type's EDGECONST constant 2624 + * @param array<PhabricatorQueryConstraint> $constraints 2623 2625 * @return $this 2624 2626 * @task edgelogic 2625 2627 */ 2626 2628 public function withEdgeLogicConstraints($edge_type, array $constraints) { 2627 - assert_instances_of($constraints, 'PhabricatorQueryConstraint'); 2629 + assert_instances_of($constraints, PhabricatorQueryConstraint::class); 2628 2630 2629 2631 $constraints = mgroup($constraints, 'getOperator'); 2630 2632 foreach ($constraints as $operator => $list) {
+1 -1
src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php
··· 487 487 return $this; 488 488 } 489 489 490 - assert_instances_of($objects, 'PhabricatorPolicyInterface'); 490 + assert_instances_of($objects, PhabricatorPolicyInterface::class); 491 491 492 492 $viewer_fragment = $this->getViewer()->getCacheFragment(); 493 493
+9 -2
src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
··· 104 104 return $this->getRef()->getDisplayName(); 105 105 } 106 106 107 + /** 108 + * @param array<PhabricatorStoragePatch> $patches 109 + * @param bool $only_living 110 + */ 107 111 public function getDatabaseList(array $patches, $only_living = false) { 108 - assert_instances_of($patches, 'PhabricatorStoragePatch'); 112 + assert_instances_of($patches, PhabricatorStoragePatch::class); 109 113 110 114 $list = array(); 111 115 ··· 194 198 implode(', ', $cols)); 195 199 } 196 200 201 + /** 202 + * @param array<PhabricatorStoragePatch> $patches 203 + */ 197 204 public function getLegacyPatches(array $patches) { 198 - assert_instances_of($patches, 'PhabricatorStoragePatch'); 205 + assert_instances_of($patches, PhabricatorStoragePatch::class); 199 206 200 207 try { 201 208 $row = queryfx_one(
+4 -1
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
··· 77 77 return $this->patches; 78 78 } 79 79 80 + /** 81 + * @param array<PhabricatorStoragePatch> $patches 82 + */ 80 83 public function setPatches(array $patches) { 81 - assert_instances_of($patches, 'PhabricatorStoragePatch'); 84 + assert_instances_of($patches, PhabricatorStoragePatch::class); 82 85 $this->patches = $patches; 83 86 return $this; 84 87 }
+4 -1
src/view/control/AphrontTokenizerTemplateView.php
··· 18 18 return $this; 19 19 } 20 20 21 + /** 22 + * @param array<PhabricatorTypeaheadTokenView> $value 23 + */ 21 24 public function setValue(array $value) { 22 - assert_instances_of($value, 'PhabricatorTypeaheadTokenView'); 25 + assert_instances_of($value, PhabricatorTypeaheadTokenView::class); 23 26 $this->value = $value; 24 27 return $this; 25 28 }
+4 -1
src/view/control/PhabricatorObjectSelectorDialog.php
··· 38 38 return $this; 39 39 } 40 40 41 + /** 42 + * @param array<PhabricatorObjectHandle> $handles 43 + */ 41 44 public function setHandles(array $handles) { 42 - assert_instances_of($handles, 'PhabricatorObjectHandle'); 45 + assert_instances_of($handles, PhabricatorObjectHandle::class); 43 46 $this->handles = $handles; 44 47 return $this; 45 48 }
+4 -1
src/view/form/control/AphrontFormPolicyControl.php
··· 14 14 return $this; 15 15 } 16 16 17 + /** 18 + * @param array<PhabricatorPolicy> $policies 19 + */ 17 20 public function setPolicies(array $policies) { 18 - assert_instances_of($policies, 'PhabricatorPolicy'); 21 + assert_instances_of($policies, PhabricatorPolicy::class); 19 22 $this->policies = $policies; 20 23 return $this; 21 24 }
+4 -1
src/view/phui/PHUITimelineView.php
··· 233 233 ''); 234 234 } 235 235 236 + /** 237 + * @param array<PHUITimelineEventView> $events 238 + */ 236 239 private function prepareBadgeData(array $events) { 237 - assert_instances_of($events, 'PHUITimelineEventView'); 240 + assert_instances_of($events, PHUITimelineEventView::class); 238 241 239 242 $viewer = $this->getUser(); 240 243 $can_use_badges = PhabricatorApplication::isClassInstalledForViewer(