--TEST-- PHP 7.3 test. --RULESET-- { "@Symfony": true, "@Symfony:risky": true, "@PHP73Migration": true, "@PHP71Migration:risky": true, "list_syntax": {"syntax": "short"}, "mb_str_functions": true, "method_chaining_indentation": true, "multiline_whitespace_before_semicolons": true, "native_function_invocation": {"include": ["get_class"]}, "no_unset_cast": true, "no_unset_on_property": true, "php_unit_dedicate_assert": true, "php_unit_expectation": true, "php_unit_mock": true, "php_unit_strict": true, "php_unit_test_case_static_method_calls": {"call_type": "this"}, "strict_param": true } --REQUIREMENTS-- {"php": 70300, "php<": 80000} --EXPECT-- __invoke(1); // `magic_method_casing` rule implode('', $pieces); // `implode_call` rule implode('', $pieces); // `implode_call` rule null === $var; // `is_null` rule mb_strpos($a, $b); // `mb_str_functions` rule sample('foo', 'foobarbaz', 'baz'); // `method_argument_space` rule $user->setEmail('voff.web@gmail.com') // `method_chaining_indentation` rule ->setPassword('233434'); $a = (int) $b; // `modernize_types_casting` rule $this->method1() // `multiline_whitespace_before_semicolons` rule ->method2(3); mb_strlen($str); // `native_function_casing` rule $c = \get_class($d); // `native_function_invocation` rule $a = rtrim($b); // `no_alias_functions` rule $foo->bar($arg1, $arg2); // `no_spaces_inside_parenthesis` rule final class MyClass extends PHPUnit_Framework_TestCase { public function testFoo(): void { $this->assertTrue($a); // `php_unit_construct` rule $this->assertNan($a); // `php_unit_dedicate_assert` rule $this->expectException('RuntimeException'); $this->expectExceptionMessage('Msg'); $this->expectExceptionCode(123); // `php_unit_expectation` rule $this->createMock('Foo'); // `php_unit_mock` rule $this->assertSame(1, 2); // `php_unit_test_case_static_method_calls` rule $this->assertSame(1, $a, ''); // `php_unit_strict` rule } } $a ** 1; // `pow_to_exponentiation` rule random_int($a, $b); // `random_api_migration` rule $foo = (int) $foo; // `set_type_to_cast` rule in_array($b, $c, true); // `strict_param` rule @trigger_error('Warning.', \E_USER_DEPRECATED); // `error_suppression` rule foo(null === $a); // `yoda_style` rule $a = null; // `no_unset_cast` rule $foo->bar = null; // `no_unset_on_property` rule // https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes $a = <<<'EOD' abc def ghi EOD; $a = [<<<'EOD' foo EOD, <<<'EOD' bar EOD ]; $a = [ <<<'EOD' foo EOD, <<<'EOD' bar EOD, ]; foo( <<<'EOD' bar EOD, 'baz' ); --INPUT-- __INVOKE(1, ); // `magic_method_casing` rule implode($pieces, '', ); // `implode_call` rule implode($pieces, ); // `implode_call` rule is_null($var, ); // `is_null` rule strpos($a, $b, ); // `mb_str_functions` rule sample('foo', 'foobarbaz', 'baz' , ); // `method_argument_space` rule $user->setEmail('voff.web@gmail.com', ) // `method_chaining_indentation` rule ->setPassword('233434', ); $a = intval($b, ); // `modernize_types_casting` rule $this->method1() // `multiline_whitespace_before_semicolons` rule ->method2(3, ) ; STRLEN($str, ); // `native_function_casing` rule $c = get_class($d, ); // `native_function_invocation` rule $a = chop($b, ); // `no_alias_functions` rule $foo->bar( $arg1, $arg2, );// `no_spaces_inside_parenthesis` rule final class MyTest extends \PHPUnit_Framework_TestCase { public function testFoo(): void { $this->assertSame(true, $a, ); // `php_unit_construct` rule $this->assertTrue(is_nan($a, ), ); // `php_unit_dedicate_assert` rule $this->setExpectedException('RuntimeException', 'Msg', 123, ); // `php_unit_expectation` rule $this->getMock('Foo', ); // `php_unit_mock` rule static::assertSame(1, 2, ); // `php_unit_test_case_static_method_calls` rule self::assertEquals(1, $a, '', ); // `php_unit_strict` rule } } pow($a, 1, ); // `pow_to_exponentiation` rule rand($a, $b, ); // `random_api_migration` rule settype($foo, "integer", ); // `set_type_to_cast` rule in_array($b, $c, ); // `strict_param` rule trigger_error('Warning.', E_USER_DEPRECATED, ); // `error_suppression` rule foo($a === null, ); // `yoda_style` rule $a =(unset)$z; // `no_unset_cast` rule unset($foo->bar,); // `no_unset_on_property` rule // https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes $a = <<<'EOD' abc def ghi EOD; $a = [<<<'EOD' foo EOD , <<<'EOD' bar EOD ]; $a = [ <<<'EOD' foo EOD , <<<'EOD' bar EOD ]; foo( <<<'EOD' bar EOD , 'baz' );