-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPN-1438] Guardrail to add deprecated metric for class methods in the codebase #124
[SPN-1438] Guardrail to add deprecated metric for class methods in the codebase #124
Conversation
… report on deprecated web APIs
right now this just includes strong typing for params and returns
…tric' into BK/integators/SPN-1447/strongTypingForServiceMethodDocumentationCheck
… to ensure doc blocks match contract
…pingForServiceMethodDocumentationCheck [SPN-1447] Start of Service Documentation Guardrail
…tric' into BK/integators/SPN-1440/deprecatedApiAttributeMetric # Conflicts: # src/Checks/ErrorConstants.php # src/NodeVisitors/StaticAnalyzer.php # tests/units/Checks/TestTemplates.php
…edApiAttributeMetric [SPN-1440] Web Api Documentation Check and Deprecated API Attribute Metric
…edApiAttributeMetric handle both methods and functions
* fix some of the edge cases for the ServiceMethodDocumentationCheck.php. * Add better error descriptions * only run the checks on services and controllers * handle nullable types in the service check
@@ -69,8 +71,23 @@ public function run($fileName, Node $node, ClassLike $inside = null, Scope $scop | |||
} | |||
} | |||
|
|||
private function isControllerMethod(ClassLike $inside = null): bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we rename to isControllerClass()
? it's not checking the method, just the class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note, there is $this->symbolTable->isParentClassOrInterface("fully\qualified\className", $name)
available. I don't know if it's entirely appropriate for your use, but thought I'd bring it up in case it can be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
} | ||
} | ||
|
||
private function isServiceMethod(?ClassLike $inside = null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also isServiceClass()
, not method.
No description provided.