diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7dfd255..6f11248 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - name: Test latest PHPCPD release run: php ./releases/phpcpd-9.1.0.phar --log-sarif=reports/phpcpd/phpcpd-report.sarif src tests - name: Upload SARIF report to GitHub - uses: github/codeql-action/upload-sarif@v3 + uses: github/codeql-action/upload-sarif@v4 if: always() with: sarif_file: reports/phpcpd/phpcpd-report.sarif diff --git a/tests/Fixture/Math.php b/tests/Fixture/Math.php index c39f031..add869d 100644 --- a/tests/Fixture/Math.php +++ b/tests/Fixture/Math.php @@ -72,47 +72,6 @@ public function sub($v1, $v2) return ($v1 - $v2); } - /** - * Not tested method that should be visible with low coverage. - * Note: Added check for skipping php attributes. - */ - #[ORM\Entity] - #[ORM\Table(name: 'api_key')] - #[Groups([ - 'ApiKey', - 'ApiKey.id', - 'LogRequest.apiKey', - ])] - #[OA\Response( - response: 401, - description: 'Invalid token (not found or expired)', - content: new JsonContent( - properties: [ - new Property(property: 'code', description: 'Error code', type: 'integer'), - new Property(property: 'message', description: 'Error description', type: 'string'), - ], - type: 'object', - example: [ - 'code' => 401, - 'message' => 'JWT Token not found', - ], - ), - )] - #[OA\Response( - response: 403, - description: 'Access denied', - content: new JsonContent( - properties: [ - new Property(property: 'code', description: 'Error code', type: 'integer'), - new Property(property: 'message', description: 'Error description', type: 'string'), - ], - type: 'object', - example: [ - 'code' => 403, - 'message' => 'Access denied', - ], - ), - )] public function div($v1, $v2) { $v3 = $v1 / ($v2 + $v1); @@ -174,47 +133,7 @@ public function div($v1, $v2) return $v8; } - /** - * Simple copy for cpd detection. - */ - #[ORM\Entity] - #[ORM\Table(name: 'api_key')] - #[Groups([ - 'ApiKey', - 'ApiKey.id', - 'LogRequest.apiKey', - ])] - #[OA\Response( - response: 401, - description: 'Invalid token (not found or expired)', - content: new JsonContent( - properties: [ - new Property(property: 'code', description: 'Error code', type: 'integer'), - new Property(property: 'message', description: 'Error description', type: 'string'), - ], - type: 'object', - example: [ - 'code' => 401, - 'message' => 'JWT Token not found', - ], - ), - )] - #[OA\Response( - response: 403, - description: 'Access denied', - content: new JsonContent( - properties: [ - new Property(property: 'code', description: 'Error code', type: 'integer'), - new Property(property: 'message', description: 'Error description', type: 'string'), - ], - type: 'object', - example: [ - 'code' => 403, - 'message' => 'Access denied', - ], - ), - )] - public function complex($v1, $v2) + public function div($v1, $v2) { $v3 = $v1 / ($v2 + $v1); if ($v3 > 14)