Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory-integrator
Commits
052c1cde
Verified
Commit
052c1cde
authored
1 month ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
Refactor(WebServiceCall) - clean up code formatting and update .gitignore for IDE files
parent
b06bea04
dev
1 merge request
!55
Resolve "[Integrator] - Rest library - update to allow easy trigger of archiving objects"
Pipeline
#32411
passed with stages
in 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+8
-0
.gitignore
src/FusionDirectory/Rest/WebServiceCall.php
+16
-16
src/FusionDirectory/Rest/WebServiceCall.php
with
24 additions
and
16 deletions
+24
-16
.gitignore
+
8
−
0
View file @
052c1cde
.directory
filelist
phpstan-baseline.neon
phpstan.neon
.idea/.gitignore
.idea/fusiondirectory-integrator.iml
.idea/modules.xml
.idea/php.xml
.idea/vcs.xml
This diff is collapsed.
Click to expand it.
src/FusionDirectory/Rest/WebServiceCall.php
+
16
−
16
View file @
052c1cde
...
...
@@ -77,7 +77,7 @@ class WebServiceCall
if
(
!
empty
(
$this
->
data
))
{
curl_setopt
(
$this
->
ch
,
CURLOPT_POSTFIELDS
,
json_encode
(
$this
->
data
));
}
curl_setopt
(
$this
->
ch
,
CURLOPT_USERAGENT
,
$customUserAgent
);
break
;
}
...
...
@@ -206,12 +206,12 @@ class WebServiceCall
return
$response
;
}
/**
* @return array
* @throws \Exception
*/
public
function
execute
():
array
{
/**
* @return array
* @throws \Exception
*/
public
function
execute
():
array
{
$response
=
curl_exec
(
$this
->
ch
);
// Capture the HTTP status code
...
...
@@ -225,7 +225,7 @@ public function execute(): array
return
[];
// Return an empty array for 204 responses
}
$decoded
=
json_decode
(
$response
,
true
);
$decoded
=
json_decode
(
$response
,
TRUE
);
curl_close
(
$this
->
ch
);
if
(
!
is_array
(
$decoded
))
{
...
...
@@ -233,16 +233,16 @@ public function execute(): array
}
return
$decoded
;
}
}
/**
* Retrieve the HTTP status code of the last request
* @return int
*/
public
function
getHttpStatusCode
():
int
{
/**
* Retrieve the HTTP status code of the last request
* @return int
*/
public
function
getHttpStatusCode
():
int
{
return
$this
->
httpStatusCode
;
}
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets