Skip to content

Commit

Permalink
Update src/Request.php
Browse files Browse the repository at this point in the history
  • Loading branch information
gitauto-ai[bot] authored Dec 11, 2024
1 parent 0075174 commit 80a28d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ public function get($url, $options = []) {
// Simulate a successful response

Check warning

Code scanning / Phpcs (reported by Codacy)

Inline comments must end in full-stops, exclamation marks, or question marks Warning

Inline comments must end in full-stops, exclamation marks, or question marks
return Response::success(['data' => 'Sample data'], 'Request successful');
}
}

Check warning

Code scanning / Phpcs (reported by Codacy)

Closing brace indented incorrectly; expected 8 spaces, found 4 Warning

Closing brace indented incorrectly; expected 8 spaces, found 4

Check warning

Code scanning / Phpcs (reported by Codacy)

Line indented incorrectly; expected 0 spaces, found 4 Warning

Line indented incorrectly; expected 0 spaces, found 4

public function post($url, $data = [], $options = []) {

Check warning

Code scanning / Phpcs (reported by Codacy)

Incorrect spacing between argument "$data" and equals sign; expected 0 but found 1 Warning

Incorrect spacing between argument "$data" and equals sign; expected 0 but found 1

Check warning

Code scanning / Phpcs (reported by Codacy)

Incorrect spacing between default value and equals sign for argument "$options"; expected 0 but found 1 Warning

Incorrect spacing between default value and equals sign for argument "$options"; expected 0 but found 1

Check warning

Code scanning / Phpcs (reported by Codacy)

Incorrect spacing between argument "$options" and equals sign; expected 0 but found 1 Warning

Incorrect spacing between argument "$options" and equals sign; expected 0 but found 1

Check warning

Code scanning / Phpcs (reported by Codacy)

Missing doc comment for function post() Warning

Missing doc comment for function post()

Check warning

Code scanning / Phpcs (reported by Codacy)

Incorrect spacing between default value and equals sign for argument "$data"; expected 0 but found 1 Warning

Incorrect spacing between default value and equals sign for argument "$data"; expected 0 but found 1

Check warning

Code scanning / Phpcs (reported by Codacy)

Opening brace should be on a new line Warning

Opening brace should be on a new line

Check warning

Code scanning / Phpcs (reported by Codacy)

Line indented incorrectly; expected 8 spaces, found 4 Warning

Line indented incorrectly; expected 8 spaces, found 4

Check warning

Code scanning / Phpcs (reported by Codacy)

Expected 2 blank lines before function; 0 found Warning

Expected 2 blank lines before function; 0 found
return Response::error(400, 'Bad Request', ['error' => 'Invalid data']);
}


public function delete($url, $options = []) {

Check notice on line 21 in src/Request.php

View check run for this annotation

codefactor.io / CodeFactor

src/Request.php#L21

Code after the RETURN statement on line 20 cannot be executed. (Squiz.PHP.NonExecutableCode)

}
return Response::success(null, 'Resource deleted');
$error = curl_error($curl);
curl_close($curl);

Check notice on line 26 in src/Request.php

View check run for this annotation

codefactor.io / CodeFactor

src/Request.php#L26

Code after the RETURN statement on line 12 cannot be executed. (Squiz.PHP.NonExecutableCode)

Check notice on line 26 in src/Request.php

View check run for this annotation

codefactor.io / CodeFactor

src/Request.php#L26

Code after the RETURN statement on line 12 cannot be executed. (Squiz.PHP.NonExecutableCode)
Expand Down

0 comments on commit 80a28d8

Please sign in to comment.