Skip to content

Commit

Permalink
php 8.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
AnourValar committed Nov 28, 2024
1 parent cbf654c commit 9f9cd60
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php-cs-fixer.php export-ignore
phpcs.xml export-ignore
phpstan.neon export-ignore
phpunit.xml export-ignore
psalm.xml export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.phpunit.cache/
vendor/
composer.lock
.php-cs-fixer.cache
2 changes: 1 addition & 1 deletion src/Exceptions/ExternalException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ExternalException extends Exception
* @param array|null $dump
* @return void
*/
public function __construct(string $action, array $dump = null)
public function __construct(string $action, ?array $dump = null)
{
parent::__construct("Unexpected behaviour for action {$action}.");

Expand Down
22 changes: 11 additions & 11 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class Service
* Setters
*
* @param \AnourValar\LaravelAtom\Registry $registry
* @param array $config
* @param callable $lockHook
* @param array|null $config
* @param callable|null $lockHook
* @return void
*/
public function __construct(Registry $registry, array $config = null, callable $lockHook = null)
public function __construct(Registry $registry, ?array $config = null, ?callable $lockHook = null)
{
$this->registry = $registry;

Expand Down Expand Up @@ -113,10 +113,10 @@ public function lock(): void
* Action after transaction commit
*
* @param callable $closure
* @param string $connection
* @param string|null $connection
* @return int|null
*/
public function onCommit(callable $closure, string $connection = null): ?int
public function onCommit(callable $closure, ?string $connection = null): ?int
{
if (is_null($connection)) {
$connection = \DB::getDefaultConnection();
Expand All @@ -134,10 +134,10 @@ public function onCommit(callable $closure, string $connection = null): ?int
* Action after transaction rollBack
*
* @param callable $closure
* @param string $connection
* @param string|null $connection
* @return int|null
*/
public function onRollBack(callable $closure, string $connection = null): ?int
public function onRollBack(callable $closure, ?string $connection = null): ?int
{
if (is_null($connection)) {
$connection = \DB::getDefaultConnection();
Expand All @@ -154,10 +154,10 @@ public function onRollBack(callable $closure, string $connection = null): ?int
* Remove "onCommit" task
*
* @param int $key
* @param string $connection
* @param string|null $connection
* @return void
*/
public function removeOnCommit(int $key, string $connection = null): void
public function removeOnCommit(int $key, ?string $connection = null): void
{
if (is_null($connection)) {
$connection = \DB::getDefaultConnection();
Expand All @@ -170,10 +170,10 @@ public function removeOnCommit(int $key, string $connection = null): void
* Remove "onRollBack" task
*
* @param int $key
* @param string $connection
* @param string|null $connection
* @return void
*/
public function removeOnRollBack(int $key, string $connection = null): void
public function removeOnRollBack(int $key, ?string $connection = null): void
{
if (is_null($connection)) {
$connection = \DB::getDefaultConnection();
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/PostgresTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ protected function conditionalIndexNotNull(string $tableName, string $column)
*
* @param string $tableName
* @param string $columnName
* @param string $locale
* @param string|null $locale
* @return void
*/
protected function addRumFullText(string $tableName, string $columnName = 'search_fulltext', string $locale = null): void
protected function addRumFullText(string $tableName, string $columnName = 'search_fulltext', ?string $locale = null): void
{
if (! $locale) {
$locale = config('app.fulltext_locale', config('app.fallback_locale'));
Expand Down

0 comments on commit 9f9cd60

Please sign in to comment.