Skip to content

Commit

Permalink
Some fixes on test suite (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek- authored Aug 10, 2022
1 parent 80694cf commit a7284ee
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.1.0
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.1.0
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.run.php }}
coverage: none
Expand Down
4 changes: 3 additions & 1 deletion spec/Gaufrette/Adapter/GridFSSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ function let(Bucket $bucket)
function letGo()
{
array_map(function ($res) {
@fclose($res);
if (is_resource($res)) {
@fclose($res);
}
}, $this->resources);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Gaufrette/Adapter/AsyncAwsS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function setMetadata($key, $content)
*/
public function getMetadata($key)
{
return isset($this->metadata[$key]) ? $this->metadata[$key] : [];
return $this->metadata[$key] ?? [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Gaufrette/Adapter/AwsS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function setMetadata($key, $metadata)
*/
public function getMetadata($key)
{
return isset($this->metadata[$key]) ? $this->metadata[$key] : [];
return $this->metadata[$key] ?? [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Gaufrette/Adapter/GoogleCloudStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public function getMetadata($key)
{
$path = $this->computePath($key);

return isset($this->metadata[$path]) ? $this->metadata[$path] : [];
return $this->metadata[$path] ?? [];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Gaufrette/Adapter/InMemory.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function keys()
*/
public function mtime($key)
{
return isset($this->files[$key]['mtime']) ? $this->files[$key]['mtime'] : false;
return $this->files[$key]['mtime'] ?? false;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Gaufrette/StreamWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ protected function createStream($path)
);

$domain = $parts['host'];
$key = substr($parts['path'], 1);
$key = !empty($parts['path']) ? substr($parts['path'], 1) : '';

if (null !== $parts['query']) {
$key .= '?' . $parts['query'];
Expand Down

0 comments on commit a7284ee

Please sign in to comment.