Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM php:8.1-cli
RUN apt-get update \
&& apt-get install -y \
libzip-dev \
unzip \
git \
wget \
&& docker-php-ext-install -j$(nproc) bcmath sockets \
&& wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 \
&& mv test-reporter-latest-linux-amd64 /usr/bin/cc-test-reporter \
&& chmod +x /usr/bin/cc-test-reporter \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN apt-get update
RUN apt-get install -y \
libzip-dev \
unzip \
git \
wget
RUN docker-php-ext-install -j$(nproc) bcmath sockets
RUN wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
RUN mv test-reporter-latest-linux-amd64 /usr/bin/cc-test-reporter
RUN chmod +x /usr/bin/cc-test-reporter
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

WORKDIR /opt/project

Expand Down
2 changes: 1 addition & 1 deletion src/Bolt/BoltDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct(
*
* @psalm-suppress MixedReturnTypeCoercion
*/
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, FormatterInterface $formatter = null): self
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, ?FormatterInterface $formatter = null): self
{
if (is_string($uri)) {
$uri = Uri::create($uri);
Expand Down
2 changes: 1 addition & 1 deletion src/Bolt/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function runStatements(iterable $statements, ?TransactionConfiguration $c
/**
* @param iterable<Statement>|null $statements
*/
public function openTransaction(iterable $statements = null, ?TransactionConfiguration $config = null): UnmanagedTransactionInterface
public function openTransaction(?iterable $statements = null, ?TransactionConfiguration $config = null): UnmanagedTransactionInterface
{
return $this->beginTransaction($statements, $this->mergeTsxConfig($config));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Common/GeneratorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ final class GeneratorHelper
*
* @return T
*/
public static function getReturnFromGenerator(Generator $generator, float $timeout = null)
public static function getReturnFromGenerator(Generator $generator, ?float $timeout = null)
{
$start = microtime(true);
while ($generator->valid()) {
Expand Down
4 changes: 2 additions & 2 deletions src/Databags/HttpPsrBindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class HttpPsrBindings
* @param callable():StreamFactoryInterface|StreamFactoryInterface|null $streamFactory
* @param callable():RequestFactoryInterface|RequestFactoryInterface|null $requestFactory
*/
public function __construct(callable|ClientInterface|null $client = null, callable|StreamFactoryInterface $streamFactory = null, callable|RequestFactoryInterface $requestFactory = null)
public function __construct(callable|ClientInterface|null $client = null, callable|StreamFactoryInterface|null $streamFactory = null, callable|RequestFactoryInterface|null $requestFactory = null)
{
$this->client = $client ?? static fn (): ClientInterface => Psr18ClientDiscovery::find();
$this->streamFactory = $streamFactory ?? static fn (): StreamFactoryInterface => Psr17FactoryDiscovery::findStreamFactory();
Expand All @@ -61,7 +61,7 @@ public function __construct(callable|ClientInterface|null $client = null, callab
* @param callable():StreamFactoryInterface|StreamFactoryInterface|null $streamFactory
* @param callable():RequestFactoryInterface|RequestFactoryInterface|null $requestFactory
*/
public static function create(callable|ClientInterface $client = null, callable|StreamFactoryInterface $streamFactory = null, callable|RequestFactoryInterface $requestFactory = null): self
public static function create(callable|ClientInterface|null $client = null, callable|StreamFactoryInterface|null $streamFactory = null, callable|RequestFactoryInterface|null $requestFactory = null): self
{
return new self($client, $streamFactory, $requestFactory);
}
Expand Down
8 changes: 4 additions & 4 deletions src/DriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ final class DriverFactory
* : DriverInterface<OGMResults>
* )
*/
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, FormatterInterface $formatter = null, ?string $logLevel = null, ?LoggerInterface $logger = null): DriverInterface
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, ?FormatterInterface $formatter = null, ?string $logLevel = null, ?LoggerInterface $logger = null): DriverInterface
{
if (is_string($uri)) {
$uri = Uri::create($uri);
Expand Down Expand Up @@ -77,7 +77,7 @@ public static function create(string|UriInterface $uri, ?DriverConfiguration $co
* : DriverInterface<OGMResults>
* )
*/
private static function createBoltDriver(string|UriInterface $uri, ?DriverConfiguration $configuration, ?AuthenticateInterface $authenticate, FormatterInterface $formatter = null): DriverInterface
private static function createBoltDriver(string|UriInterface $uri, ?DriverConfiguration $configuration, ?AuthenticateInterface $authenticate, ?FormatterInterface $formatter = null): DriverInterface
{
if ($formatter !== null) {
return BoltDriver::create($uri, $configuration, $authenticate, $formatter);
Expand All @@ -97,7 +97,7 @@ private static function createBoltDriver(string|UriInterface $uri, ?DriverConfig
* : DriverInterface<OGMResults>
* )
*/
private static function createNeo4jDriver(string|UriInterface $uri, ?DriverConfiguration $configuration, ?AuthenticateInterface $authenticate, FormatterInterface $formatter = null): DriverInterface
private static function createNeo4jDriver(string|UriInterface $uri, ?DriverConfiguration $configuration, ?AuthenticateInterface $authenticate, ?FormatterInterface $formatter = null): DriverInterface
{
if ($formatter !== null) {
return Neo4jDriver::create($uri, $configuration, $authenticate, $formatter);
Expand All @@ -119,7 +119,7 @@ private static function createNeo4jDriver(string|UriInterface $uri, ?DriverConfi
*
* @pure
*/
private static function createHttpDriver(string|UriInterface $uri, ?DriverConfiguration $configuration, ?AuthenticateInterface $authenticate, FormatterInterface $formatter = null): DriverInterface
private static function createHttpDriver(string|UriInterface $uri, ?DriverConfiguration $configuration, ?AuthenticateInterface $authenticate, ?FormatterInterface $formatter = null): DriverInterface
{
if ($formatter !== null) {
return HttpDriver::create($uri, $configuration, $authenticate, $formatter);
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/Neo4jException.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class Neo4jException extends RuntimeException
/**
* @param non-empty-list<Neo4jError> $errors
*/
public function __construct(array $errors, Throwable $previous = null)
public function __construct(array $errors, ?Throwable $previous = null)
{
$error = $errors[0];
$message = sprintf(self::MESSAGE_TEMPLATE, $error->getCode(), $error->getMessage() ?? 'NULL');
Expand Down
2 changes: 1 addition & 1 deletion src/Http/HttpDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function __construct(
*
* @pure
*/
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, FormatterInterface $formatter = null): self
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, ?FormatterInterface $formatter = null): self
{
if (is_string($uri)) {
$uri = Uri::create($uri);
Expand Down
2 changes: 1 addition & 1 deletion src/Neo4j/Neo4jDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct(
*
* @psalm-suppress MixedReturnTypeCoercion
*/
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, FormatterInterface $formatter = null, ?AddressResolverInterface $resolver = null): self
public static function create(string|UriInterface $uri, ?DriverConfiguration $configuration = null, ?AuthenticateInterface $authenticate = null, ?FormatterInterface $formatter = null, ?AddressResolverInterface $resolver = null): self
{
if (is_string($uri)) {
$uri = Uri::create($uri);
Expand Down
2 changes: 1 addition & 1 deletion src/Neo4j/RoutingTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getTtl(): int
*
* @return list<string>
*/
public function getWithRole(RoutingRoles $role = null): array
public function getWithRole(?RoutingRoles $role = null): array
{
/** @psalm-var list<string> $tbr */
$tbr = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Types/AbstractCypherSequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public function reversed(): self
*
* @psalm-mutation-free
*/
public function slice(int $offset, int $length = null): self
public function slice(int $offset, ?int $length = null): self
{
return $this->withOperation(function () use ($offset, $length) {
if ($length !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/Types/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function pairs(): ArrayList
*
* @return static<TValue>
*/
public function ksorted(callable $comparator = null): Map
public function ksorted(?callable $comparator = null): Map
{
return $this->withOperation(function () use ($comparator) {
$pairs = $this->pairs()->sorted(static function (Pair $x, Pair $y) use ($comparator) {
Expand Down
Loading