Skip to content

Commit

Permalink
update to new php style
Browse files Browse the repository at this point in the history
  • Loading branch information
miladrahimi committed Nov 30, 2023
1 parent 8ca2da8 commit ef76b48
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/Classes/C.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class C
{
public $a;
public A $a;

public $b;
public B $b;

public function __construct(A $a, B $b)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Classes/E.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class E implements Blank
{
public $a;
public A $a;

public $value;
public string $value;

public function __construct(A $a, string $value = 'something')
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Classes/F.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class F
{
public $a;
public A $a;

public $value;
public string $value;

public function __construct(A $a, string $value)
{
Expand Down
7 changes: 7 additions & 0 deletions tests/Classes/G.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@

class G
{
/**
* @var mixed
*/
public $number;

/**
* @param mixed $number
* @return void
*/
public function setNumber($number)
{
$this->number = $number;
Expand Down
4 changes: 2 additions & 2 deletions tests/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ public function test_callable_binding_with_injection()
{
$this->container->singleton(Blank::class, E::class);

$this->container->transient('element', function (Blank $e, B $b) {
return $e instanceof E && $b instanceof B;
$this->container->transient('element', function (Blank $e) {
return $e instanceof E;
});

$x = $this->container->get('element');
Expand Down

0 comments on commit ef76b48

Please sign in to comment.