Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Rector\Tests\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector\Fixture;

final class SuperglobalsInArrowFunction
{
public function usingServer()
{
PostStringyKey::retrieved(fn ($model) => $_SERVER['destroy']['retrieved'][] = $model->my_id);
}
}
?>
-----
<?php

namespace Rector\Tests\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector\Fixture;

final class SuperglobalsInArrowFunction
{
public function usingServer()
{
PostStringyKey::retrieved(function ($model) {
return $_SERVER['destroy']['retrieved'][] = $model->my_id;
});
}
}
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector\Fixture;

class ConditionalReturnType
{
/**
* @template TValue of array<array|scalar>|scalar
*
* @return (TValue is scalar ? array|scalar : array<array|scalar>)
*/
public function resolveValue(): mixed
{
}
}

?>
-----
<?php

namespace Rector\Tests\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector\Fixture;

class ConditionalReturnType
{
/**
* @template TValue of array<array|scalar>|scalar
*
* @return (TValue is scalar ? array|scalar : array<array|scalar>)
*/
public function resolveValue()
{
}
}

?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\Fixture;

use Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\Source\SomeAttributes;

final class Anything extends SomeAttributes
{
public function __construct()
{
parent::__construct(
tags: ['some_items']
);
}
}

?>
-----
<?php

namespace Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\Fixture;

use Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\Source\SomeAttributes;

final class Anything extends SomeAttributes
{
public function __construct()
{
parent::__construct(
['some_items']
);
}
}

?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Rector\Tests\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector\Source;

final class SomeAttributes
{
public function __construct(array $tags)
{
}
}
Loading