Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
cerbero90 committed Dec 19, 2023
1 parent da798a5 commit dc3de4e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/Dtos/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ public function __construct(
public readonly int $concurrency,
public readonly int $timeout,
public readonly int $attempts,
) {
}
) {}
}
3 changes: 1 addition & 2 deletions src/LazyJsonPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public static function from(mixed $source, Closure $configure): LazyCollection
private function __construct(
private readonly AnySource $source,
private readonly Config $config,
) {
}
) {}

/**
* Retrieve the paginated items lazily.
Expand Down
5 changes: 2 additions & 3 deletions src/Paginations/Pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
*/
abstract class Pagination implements IteratorAggregate
{
public final function __construct(
final public function __construct(
protected readonly AnySource $source,
protected readonly Config $config,
) {
}
) {}

/**
* @return Traversable<string|int, mixed>
Expand Down
4 changes: 1 addition & 3 deletions src/Services/ConfigFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ final class ConfigFactory
*/
private $backoff;

public function __construct(private AnySource $source)
{
}
public function __construct(private AnySource $source) {}

/**
* Set the dot-notation path to extract items from
Expand Down
1 change: 0 additions & 1 deletion src/Sources/AnySource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Cerbero\LazyJsonPages\Exceptions\UnsupportedSourceException;
use Generator;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

class AnySource extends Source
{
Expand Down
5 changes: 2 additions & 3 deletions src/Sources/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

abstract class Source
{
public final function __construct(
final public function __construct(
protected readonly mixed $source,
) {
}
) {}

abstract public function matches(): bool;

Expand Down

0 comments on commit dc3de4e

Please sign in to comment.