Add /recommendations/evaluation endpoint handling #70930
tests.yml
on: pull_request
Determine tests matrix
7s
Storybook tests
3m 14s
Check plugin monorepo dep versions
24s
Static analysis
4m 59s
Matrix: run-tests
Annotations
8 errors
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L83
TypeError PhanTypeMismatchReturnProbablyReal Returning new WP_Error('missing_goals', 'Goals are required', ['status'=>400]) of type \WP_Error but evaluate_site_recommendations() is declared to return array (no real type) (the inferred real return type has nothing in common with the declared phpdoc return type)
|
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L93
TypeError PhanTypeMismatchReturnProbablyReal Returning new WP_Error('recommendations_evaluation_fetch_failed', 'Evaluation processing failed', ['status'=>($response_code ? $response_code : 400)]) of type \WP_Error but evaluate_site_recommendations() is declared to return array (no real type) (the inferred real return type has nothing in common with the declared phpdoc return type)
|
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L96
ParamError PhanParamTooMany Call with 2 arg(s) to \rest_ensure_response($response) which only takes 1 arg(s) defined at /home/runner/work/jetpack/jetpack/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php:134216
|
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L96
TypeError PhanTypeMismatchReturn Returning rest_ensure_response($body, 200) of type \WP_Error|\WP_REST_Response but evaluate_site_recommendations() is declared to return array
|
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L110
TypeError PhanTypeMismatchReturnProbablyReal Returning new WP_Error('missing_recommendations', 'Recommendations are required', ['status'=>400]) of type \WP_Error but save_evaluation_recommendations() is declared to return array (no real type) (the inferred real return type has nothing in common with the declared phpdoc return type)
|
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L115
ParamError PhanParamTooMany Call with 2 arg(s) to \rest_ensure_response($response) which only takes 1 arg(s) defined at /home/runner/work/jetpack/jetpack/vendor/php-stubs/wordpress-stubs/wordpress-stubs.php:134216
|
Static analysis:
projects/packages/my-jetpack/src/class-rest-recommendations-evaluation.php#L115
TypeError PhanTypeMismatchReturn Returning rest_ensure_response(['success'=>true], 200) of type \WP_Error|\WP_REST_Response but save_evaluation_recommendations() is declared to return array
|
Static analysis
Process completed with exit code 1.
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
PHP tests - PHP 7.4 WP latest
Expired
|
4.47 KB |
|
PHP tests - PHP 8.0 WP latest
Expired
|
4.51 KB |
|
PHP tests - PHP 8.1 WP latest
Expired
|
4.48 KB |
|
PHP tests - PHP 8.2 WP latest
Expired
|
4.47 KB |
|
PHP tests - PHP 8.2 WP previous
Expired
|
4.5 KB |
|
PHP tests - PHP 8.2 WP trunk
Expired
|
4.5 KB |
|
PHP tests - PHP 8.3 WP latest
Expired
|
4.47 KB |
|