Skip to content
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

v1.0.3 #5

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# LF for text type files
* text=auto eol=lf
* text=auto eol=lf

/.github export-ignore
/test export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.phpcs.xml export-ignore
mockutils.iml export-ignore
phpstan.neon export-ignore
phpunit.xml.dist export-ignore
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "11.*",
"php-mock/php-mock": "^2.5",
"squizlabs/php_codesniffer": "^3.8"
"squizlabs/php_codesniffer": "^3.8",
"ernestmarcinko/mockutils": "^1.0"
},
"require": {
"php": "^8.3"
Expand Down
6 changes: 3 additions & 3 deletions src/RequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ interface RequestHandler {
* @param string|array<string, mixed>|false|null $post_fields
*/
public function make(
RequestMethods $method,
string $endpoint,
array|null $header = null,
RequestMethods $method,
string $endpoint,
array|null $header = null,
array|string|bool|null $post_fields = null
): static;

Expand Down
2 changes: 1 addition & 1 deletion src/WaifuApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function ($v, $k) {
ARRAY_FILTER_USE_BOTH
));
if ($params !== '') {
$url .= '?' . $params;
$url .= '?' . $params;
}
if (isset($args['url'])) {
$post_fields['url'] = $args['url'];
Expand Down
6 changes: 3 additions & 3 deletions src/WaifuRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class WaifuRequestHandler implements RequestHandler {
* @throws Exception
*/
public function make(
RequestMethods $method,
string $endpoint,
array|null $header = null,
RequestMethods $method,
string $endpoint,
array|null $header = null,
array|string|bool|null $post_fields = null
): static {
$curl = curl_init();
Expand Down
52 changes: 0 additions & 52 deletions tests/WaifuTests/GlobalMock.php

This file was deleted.

1 change: 0 additions & 1 deletion tests/WaifuTests/WaifuApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public function testGetFile(): void {
}

public function setUp(): void {
GlobalMock::disable();
$args = [
"token" => "13b2485a-1010-4e3e-8f75-20f2a0c50b56",
"url" => "https://waifuvault.moe/f/1711098733870/image.jpg",
Expand Down
Loading