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

WIP remove $configuration, and clean up exec, upload and download #356

Merged
merged 4 commits into from
Oct 30, 2020

Conversation

Richard87
Copy link

WIP

Solves #355

use Psr\Log\LoggerInterface;
use Http\Adapter\Guzzle7\Client as GuzzleAdapter;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There must be one blank line after the last USE statement; 2 found;

* @param ConfigurationInterface|ClientInterface|null $configuration
* @throws JiraException
*/
private function configureClient($configuration = null, string $path ="./"): void {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Incorrect spacing between default value and equals sign for argument $path; expected 1 but found 0
  • Opening brace should be on a new line

* 204: The server successfully processed the request, but is not returning any content.
*/
if ($this->http_response === 204 || $this->http_response === 201 || $this->http_response === 200) {
if(!$content) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected 1 space after IF keyword; 0 found

// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); cannot be activated when an open_basedir is set
if (!function_exists('ini_get') || !ini_get('open_basedir')) {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
if (!in_array($this->http_response, [201,200], true)){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected 1 space after closing parenthesis; found 0

$this->log->error($msg);

curl_close($ch);
$request = new Request("POST",$url,['Content-Type' => 'multipart/form-data'],new Stream(fopen($file, "r+b")));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space found after comma in function call


$this->log->debug('Curl exec='.$url);
$response = curl_exec($ch);
$response = $this->client->sendRequest(new Request("GET",$url));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space found after comma in function call


if (!in_array($this->http_response,[200,201], true)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space found after comma in function call

}

while (!$stream->eof()) {
fwrite($outputFile,$stream->read(4096));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space found after comma in function call

@lesstif lesstif merged commit dc6cac0 into lesstif:master Oct 30, 2020
@Richard87
Copy link
Author

What? this is not ready :S

@lesstif
Copy link
Owner

lesstif commented Nov 10, 2020

hi @Richard87

i'm sorry, i was not meticulous at this PR, so this PR is build broken.

could make hot fix please?

@Richard87
Copy link
Author

Hi! I'm not sure if I can?

I think you'll have to revert the commit, and push a new head, but I'm not good enough in Git, or have access to the git repository to make it happen...

I can delete all my changes, and make a new commit with basically 0 changes, so you can merge it in?

@lesstif
Copy link
Owner

lesstif commented Nov 10, 2020

hi!

i'm remove your PR and revert master branch to last commit.

if you are create new PR branch, you should send to 3.0.0-alpha branch please.

thanks!.

@Richard87
Copy link
Author

Great, thats perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants