Skip to content

Commit

Permalink
refactor: apply cs fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroTroller committed Oct 27, 2023
1 parent b3fa95d commit 4fbaebf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'no_break_comment' => false,
'no_extra_blank_lines' => true,
'no_spaces_around_offset' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_comma_in_singleline' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
Expand Down
2 changes: 1 addition & 1 deletion spec/Gaufrette/Adapter/DoctrineDbalSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function it_calculates_checksum(Connection $connection)
->$method('SELECT "checksum" FROM "someTableName" WHERE "key" = :key', ['key' => 'filename'])
->willReturn(1234);

$this->checksum('filename')->shouldReturn("1234");
$this->checksum('filename')->shouldReturn('1234');
}

function it_gets_mtime(Connection $connection)
Expand Down
8 changes: 4 additions & 4 deletions src/Gaufrette/Adapter/GoogleCloudStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ public function isDirectory(string $key): bool
}

/**
* @return array<int, string>
* @throws RuntimeException
* @throws ReflectionException
* @return array<int, string>
* @throws RuntimeException
* @throws ReflectionException
*/
public function listKeys(string $prefix = ''): array
{
Expand Down Expand Up @@ -304,7 +304,7 @@ public function listKeys(string $prefix = ''): array
}

/**
* @param array<string, mixed> $content
* @param array<string, mixed> $content
*/
public function setMetadata(string $key, array $content): void
{
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 @@ -95,7 +95,7 @@ public function exists(string $key): bool
}

/**
* @return array<int, string>
* @return array<int, string>
*/
public function keys(): array
{
Expand Down
8 changes: 4 additions & 4 deletions src/Gaufrette/Adapter/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class Local implements Adapter, StreamFactory, ChecksumCalculator, SizeCalculato
* could not be created
*/
public function __construct(
string $directory,
bool $create = false,
string $directory,
bool $create = false,
int $mode = 0777
){
) {
$this->directory = Util\Path::normalize($directory);

if (is_link($this->directory)) {
Expand Down Expand Up @@ -87,7 +87,7 @@ public function exists(string $key): bool
}

/**
* @return array<int, string>
* @return array<int, string>
* @throws \OutOfBoundsException If the computed path is out of the directory
* @throws \InvalidArgumentException if the directory already exists
* @throws \RuntimeException if the directory could not be created
Expand Down
1 change: 0 additions & 1 deletion src/Gaufrette/Adapter/PhpseclibSftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ public function createFile(string $key, Filesystem $filesystem): File
*
* It will ensure the root directory exists
*/

protected function initialize(): void
{
if ($this->initialized) {
Expand Down
1 change: 1 addition & 0 deletions src/Gaufrette/Util/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static function fromFile(string $filename): int
public static function fromResource($handle): int
{
$cStat = fstat($handle);

// if the resource is a remote file, $cStat will be false
return $cStat ? $cStat['size'] : 0;
}
Expand Down

0 comments on commit 4fbaebf

Please sign in to comment.