Skip to content

Commit

Permalink
Update Phan baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
tbradsha committed Nov 13, 2024
1 parent 891fe28 commit 1332d8c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 45 deletions.
14 changes: 5 additions & 9 deletions projects/packages/connection/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
// # Issue statistics:
// PhanParamTooMany : 40+ occurrences
// PhanTypeMismatchArgument : 40+ occurrences
// PhanDeprecatedFunction : 15+ occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 15+ occurrences
// PhanTypeMismatchReturn : 15+ occurrences
// PhanTypeMismatchArgumentProbablyReal : 9 occurrences
// PhanTypeMismatchPropertyProbablyReal : 9 occurrences
// PhanNoopNew : 8 occurrences
// PhanTypeMismatchReturnProbablyReal : 8 occurrences
// PhanRedundantCondition : 5 occurrences
// PhanRedundantCondition : 6 occurrences
// PhanTypeArraySuspiciousNullable : 5 occurrences
// PhanTypeMismatchDefault : 5 occurrences
// PhanTypeMismatchArgumentInternal : 3 occurrences
// PhanTypeObjectUnsetDeclaredProperty : 3 occurrences
// PhanDeprecatedFunction : 2 occurrences
// PhanNonClassMethodCall : 2 occurrences
// PhanPluginUnreachableCode : 2 occurrences
// PhanPossiblyUndeclaredVariable : 2 occurrences
Expand Down Expand Up @@ -60,19 +60,15 @@
'src/sso/class-user-admin.php' => ['PhanPluginUnreachableCode', 'PhanTypeMismatchArgument'],
'src/webhooks/class-authorize-redirect.php' => ['PhanUndeclaredClassMethod'],
'tests/php/test-class-nonce-handler.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanTypeMismatchArgument'],
'tests/php/test-class-webhooks.php' => ['PhanDeprecatedFunction'],
'tests/php/test-partner-coupon.php' => ['PhanDeprecatedFunction'],
'tests/php/test-rest-endpoints.php' => ['PhanNoopNew', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal'],
'tests/php/test-tracking.php' => ['PhanDeprecatedFunction'],
'tests/php/test_Error_Handler.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument'],
'tests/php/test_Manager_integration.php' => ['PhanParamTooMany'],
'tests/php/test_Manager_unit.php' => ['PhanDeprecatedFunction', 'PhanParamTooMany', 'PhanTypeArraySuspiciousNullable', 'PhanTypeObjectUnsetDeclaredProperty'],
'tests/php/test_Rest_Authentication.php' => ['PhanDeprecatedFunction', 'PhanTypeMismatchArgument'],
'tests/php/test_Rest_Authentication.php' => ['PhanTypeMismatchArgument'],
'tests/php/test_Server_Sandbox.php' => ['PhanTypeArraySuspiciousNullable'],
'tests/php/test_Signature.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'tests/php/test_Tokens.php' => ['PhanDeprecatedFunction', 'PhanTypeObjectUnsetDeclaredProperty'],
'tests/php/test_jetpack_xmlrpc_server.php' => ['PhanDeprecatedFunction', 'PhanPluginSimplifyExpressionBool', 'PhanTypeMismatchArgument'],
'tests/php/test_package_version_tracker.php' => ['PhanDeprecatedFunction'],
'tests/php/test_Tokens.php' => ['PhanTypeObjectUnsetDeclaredProperty'],
'tests/php/test_jetpack_xmlrpc_server.php' => ['PhanPluginSimplifyExpressionBool', 'PhanTypeMismatchArgument'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
Expand Down
2 changes: 0 additions & 2 deletions projects/packages/forms/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// PhanTypeMismatchReturnProbablyReal : 9 occurrences
// PhanTypeMismatchArgumentInternal : 7 occurrences
// PhanTypeMismatchArgumentProbablyReal : 6 occurrences
// PhanDeprecatedFunction : 5 occurrences
// PhanRedundantCondition : 4 occurrences
// PhanTypePossiblyInvalidDimOffset : 3 occurrences
// PhanPluginRedundantAssignment : 2 occurrences
Expand Down Expand Up @@ -42,7 +41,6 @@
'src/dashboard/class-dashboard-view-switch.php' => ['PhanUnreferencedUseNormal'],
'src/service/class-google-drive.php' => ['PhanTypeMismatchReturnProbablyReal'],
'tests/php/contact-form/test-class.contact-form-plugin.php' => ['PhanPluginMixedKeyNoKey'],
'tests/php/contact-form/test-class.contact-form.php' => ['PhanDeprecatedFunction'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
Expand Down
10 changes: 4 additions & 6 deletions projects/packages/publicize/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
*/
return [
// # Issue statistics:
// PhanDeprecatedFunction : 9 occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 7 occurrences
// PhanTypeMismatchArgument : 7 occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 6 occurrences
// PhanTypeMismatchArgumentNullable : 3 occurrences
// PhanPluginMixedKeyNoKey : 2 occurrences
// PhanDeprecatedFunction : 2 occurrences
// PhanPossiblyUndeclaredVariable : 2 occurrences
// PhanTypeMismatchReturnProbablyReal : 2 occurrences
// PhanTypeMissingReturn : 2 occurrences
// PhanImpossibleCondition : 1 occurrence
// PhanParamSignatureMismatch : 1 occurrence
// PhanPluginDuplicateExpressionAssignmentOperation : 1 occurrence
// PhanPluginMixedKeyNoKey : 1 occurrence
// PhanPluginSimplifyExpressionBool : 1 occurrence
// PhanSuspiciousMagicConstant : 1 occurrence
// PhanTypeMismatchArgumentNullableInternal : 1 occurrence
Expand All @@ -41,10 +41,8 @@
'src/social-image-generator/class-rest-settings-controller.php' => ['PhanPluginMixedKeyNoKey'],
'src/social-image-generator/class-settings.php' => ['PhanPluginDuplicateConditionalNullCoalescing'],
'src/social-image-generator/class-setup.php' => ['PhanTypeMismatchArgumentNullable'],
'tests/php/jetpack-social-settings/test-jetpack-social-settings.php' => ['PhanDeprecatedFunction'],
'tests/php/test-connections-post-field.php' => ['PhanDeprecatedFunction', 'PhanTypeMismatchArgument'],
'tests/php/test-connections-post-field.php' => ['PhanTypeMismatchArgument'],
'tests/php/test-publicize-og-optimization.php' => ['PhanDeprecatedFunction'],
'tests/php/test-social-image-generator/test-post-settings.php' => ['PhanDeprecatedFunction'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
Expand Down
2 changes: 0 additions & 2 deletions projects/packages/stats/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// PhanParamTooMany : 7 occurrences
// PhanTypeVoidAssignment : 4 occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 2 occurrences
// PhanDeprecatedFunction : 1 occurrence
// PhanTypeMismatchReturn : 1 occurrence

// Currently, file_suppressions and directory_suppressions are the only supported suppressions
Expand All @@ -21,7 +20,6 @@
'src/class-wpcom-stats.php' => ['PhanTypeMismatchReturn'],
'tests/php/test-main.php' => ['PhanParamTooMany', 'PhanTypeVoidAssignment'],
'tests/php/test-options.php' => ['PhanTypeVoidAssignment'],
'tests/php/test-wpcom-stats.php' => ['PhanDeprecatedFunction'],
'tests/php/test-xmlrpc-provider.php' => ['PhanParamTooMany', 'PhanTypeVoidAssignment'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
Expand Down
3 changes: 1 addition & 2 deletions projects/packages/status/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// PhanPluginDuplicateConditionalNullCoalescing : 2 occurrences
// PhanPluginSimplifyExpressionBool : 2 occurrences
// PhanRedefineFunction : 2 occurrences
// PhanDeprecatedFunction : 1 occurrence
// PhanParamTooMany : 1 occurrence
// PhanPluginRedundantAssignment : 1 occurrence
// PhanRedundantCondition : 1 occurrence
Expand All @@ -34,7 +33,7 @@
'src/class-status.php' => ['PhanRedundantCondition', 'PhanUndeclaredFunction'],
'tests/php/bootstrap.php' => ['PhanRedefineFunction', 'PhanTypeMismatchReturnProbablyReal'],
'tests/php/test-host.php' => ['PhanParamTooMany'],
'tests/php/test-status.php' => ['PhanDeprecatedFunction', 'PhanTypeMismatchArgumentInternal'],
'tests/php/test-status.php' => ['PhanTypeMismatchArgumentInternal'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
Expand Down
4 changes: 1 addition & 3 deletions projects/packages/sync/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// PhanPluginSimplifyExpressionBool : 9 occurrences
// PhanPossiblyUndeclaredVariable : 8 occurrences
// PhanPluginDuplicateSwitchCaseLooseEquality : 6 occurrences
// PhanUndeclaredTypeReturnType : 6 occurrences
// PhanNonClassMethodCall : 5 occurrences
// PhanRedundantCondition : 4 occurrences
// PhanTypeExpectedObjectPropAccess : 4 occurrences
Expand All @@ -34,7 +33,6 @@
// PhanTypeMismatchReturnNullable : 2 occurrences
// PhanTypePossiblyInvalidDimOffset : 2 occurrences
// PhanTypeSuspiciousStringExpression : 2 occurrences
// PhanDeprecatedFunction : 1 occurrence
// PhanNoopNew : 1 occurrence
// PhanParamTooManyCallable : 1 occurrence
// PhanPluginUseReturnValueInternalKnown : 1 occurrence
Expand Down Expand Up @@ -83,7 +81,7 @@
'src/modules/class-woocommerce.php' => ['PhanTypeMismatchReturnProbablyReal'],
'src/replicastore/class-table-checksum.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchPropertyDefault', 'PhanTypeMismatchPropertyProbablyReal'],
'tests/php/test-actions.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'],
'tests/php/test-dedicated-sender.php' => ['PhanDeprecatedFunction', 'PhanUndeclaredProperty'],
'tests/php/test-dedicated-sender.php' => ['PhanUndeclaredProperty'],
'tests/php/test-rest-endpoints.php' => ['PhanNoopNew', 'PhanTypeMismatchReturn'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
Expand Down
8 changes: 3 additions & 5 deletions projects/packages/waf/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
*/
return [
// # Issue statistics:
// PhanDeprecatedFunction : 9 occurrences
// PhanTypeMismatchArgument : 9 occurrences
// PhanTypeMismatchArgument : 8 occurrences
// PhanNoopNew : 6 occurrences
// PhanTypeMismatchDefault : 5 occurrences
// PhanTypeMismatchReturn : 5 occurrences
// PhanTypeMismatchReturnProbablyReal : 5 occurrences
// PhanUndeclaredConstant : 5 occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 4 occurrences
// PhanRedefineFunction : 4 occurrences
// PhanTypeMismatchArgumentInternal : 4 occurrences
Expand All @@ -26,14 +24,14 @@
// PhanTypeArraySuspiciousNullable : 2 occurrences
// PhanTypeMismatchArgumentNullable : 2 occurrences
// PhanCoalescingNeverNull : 1 occurrence
// PhanImpossibleTypeComparison : 1 occurrence
// PhanNonClassMethodCall : 1 occurrence
// PhanPluginInvalidPregRegex : 1 occurrence
// PhanTypeComparisonToArray : 1 occurrence
// PhanTypeExpectedObjectPropAccess : 1 occurrence
// PhanTypeInvalidDimOffset : 1 occurrence
// PhanTypeMismatchArgumentNullableInternal : 1 occurrence
// PhanTypeMismatchProperty : 1 occurrence
// PhanUndeclaredConstant : 1 occurrence

// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
Expand All @@ -51,7 +49,7 @@
'tests/php/unit/functions-wordpress.php' => ['PhanRedefineFunction'],
'tests/php/unit/test-waf-operators.php' => ['PhanTypeMismatchArgumentInternal'],
'tests/php/unit/test-waf-runtime-targets.php' => ['PhanPluginRedundantAssignment'],
'tests/php/unit/test-waf-standalone-bootstrap.php' => ['PhanDeprecatedFunction', 'PhanNoopNew'],
'tests/php/unit/test-waf-standalone-bootstrap.php' => ['PhanNoopNew'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
Expand Down
Loading

0 comments on commit 1332d8c

Please sign in to comment.