Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 17, 2022
1 parent 53e3889 commit 8d4d0c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
12 changes: 6 additions & 6 deletions tests/FileManipulation/ThrowsBlockAdditionTest.php
Expand Up @@ -119,15 +119,15 @@ function foo(string $s): string {
'safe_types' => true,
],
'addThrowsAnnotationToFunctionInNamespace' => [
'input_type' => '<?php
'input' => '<?php
namespace Foo;
function foo(string $s): string {
if("" === $s) {
throw new \InvalidArgumentException();
}
return $s;
}',
'output_type' => '<?php
'output' => '<?php
namespace Foo;
/**
* @throws \InvalidArgumentException
Expand All @@ -143,7 +143,7 @@ function foo(string $s): string {
'safe_types' => true,
],
'addThrowsAnnotationToFunctionFromFunctionFromOtherNamespace' => [
'input_type' => '<?php
'input' => '<?php
namespace Foo {
function foo(): void {
\Bar\bar();
Expand All @@ -158,7 +158,7 @@ function bar(): void {
throw new BarException();
}
}',
'output_type' => '<?php
'output' => '<?php
namespace Foo {
/**
* @throws \Bar\BarException
Expand All @@ -181,7 +181,7 @@ function bar(): void {
'safe_types' => true,
],
'addThrowsAnnotationAccountsForUseStatements' => [
'input_type' => '<?php
'input' => '<?php
namespace Foo {
use Bar\BarException;
function foo(): void {
Expand All @@ -197,7 +197,7 @@ function bar(): void {
namespace Bar {
class BarException extends \DomainException {}
}',
'output_type' => '<?php
'output' => '<?php
namespace Foo {
use Bar\BarException;
/**
Expand Down
8 changes: 0 additions & 8 deletions tests/FunctionCallTest.php
Expand Up @@ -1907,14 +1907,6 @@ function baz(string $s) : void {
'$b===' => 'lowercase-string',
],
],
'round_literalValue' => [
'code' => '<?php
$a = round(10.363, 2);
',
'assertions' => [
'$a===' => 'float(10.36)',
],
],
];
}

Expand Down

0 comments on commit 8d4d0c0

Please sign in to comment.