first commit
This commit is contained in:
10
vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php
vendored
Normal file
10
vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Foo\Bar;
|
||||
|
||||
class Baz {}
|
||||
|
||||
namespace Other\Space;
|
||||
|
||||
class Extender extends \Foo\Bar\Baz {}
|
||||
|
6
vendor/phpunit/php-token-stream/tests/_fixture/classInNamespace.php
vendored
Normal file
6
vendor/phpunit/php-token-stream/tests/_fixture/classInNamespace.php
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
namespace Foo\Bar;
|
||||
|
||||
class TestClass
|
||||
{
|
||||
}
|
9
vendor/phpunit/php-token-stream/tests/_fixture/classInScopedNamespace.php
vendored
Normal file
9
vendor/phpunit/php-token-stream/tests/_fixture/classInScopedNamespace.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Foo\BarScoped {
|
||||
|
||||
class TestClass {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
8
vendor/phpunit/php-token-stream/tests/_fixture/classUsesNamespacedFunction.php
vendored
Normal file
8
vendor/phpunit/php-token-stream/tests/_fixture/classUsesNamespacedFunction.php
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace foo;
|
||||
|
||||
use function bar\baz;
|
||||
|
||||
class Foo
|
||||
{
|
||||
}
|
7
vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_named_empty.php
vendored
Normal file
7
vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_named_empty.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
class class_with_method_named_empty
|
||||
{
|
||||
public function empty(): void
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
interface foo {
|
||||
}
|
||||
|
||||
class class_with_method_that_declares_anonymous_class
|
||||
{
|
||||
public function method()
|
||||
{
|
||||
$o = new class { public function foo() {} };
|
||||
$o = new class{public function foo(){}};
|
||||
$o = new class extends stdClass {};
|
||||
$o = new class extends stdClass {};
|
||||
$o = new class implements foo {};
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
class Test {
|
||||
public function methodOne() {
|
||||
$foo = new class {
|
||||
public function method_in_anonymous_class() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
return $foo->method_in_anonymous_class();
|
||||
}
|
||||
|
||||
public function methodTwo() {
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
class class_with_multiple_anonymous_classes_and_functions
|
||||
{
|
||||
public function m()
|
||||
{
|
||||
$c = new class {
|
||||
public function n() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
$d = new class {
|
||||
public function o() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
$f = function ($a, $b) {
|
||||
return $a + $b;
|
||||
};
|
||||
|
||||
$g = function ($a, $b) {
|
||||
return $a - $b;
|
||||
};
|
||||
}
|
||||
}
|
7
vendor/phpunit/php-token-stream/tests/_fixture/closure.php
vendored
Normal file
7
vendor/phpunit/php-token-stream/tests/_fixture/closure.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$function1 = function($foo, $bar) use ($var) {};
|
||||
$function2 = function(Foo $foo, $bar) use ($var) {};
|
||||
$function3 = function ($foo, $bar, $baz) {};
|
||||
$function4 = function (Foo $foo, $bar, $baz) {};
|
||||
$function5 = function () {};
|
||||
$function6 = function() {};
|
3
vendor/phpunit/php-token-stream/tests/_fixture/issue19.php
vendored
Normal file
3
vendor/phpunit/php-token-stream/tests/_fixture/issue19.php
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
class TestClass {
|
||||
}
|
8
vendor/phpunit/php-token-stream/tests/_fixture/issue30.php
vendored
Normal file
8
vendor/phpunit/php-token-stream/tests/_fixture/issue30.php
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
class Foo
|
||||
{
|
||||
public function bar()
|
||||
{
|
||||
return Foo::CLASS;
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingBraces.php
vendored
Normal file
12
vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingBraces.php
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Foo\Bar;
|
||||
|
||||
class TestClassInBar
|
||||
{
|
||||
}
|
||||
|
||||
namespace Foo\Baz;
|
||||
|
||||
class TestClassInBaz
|
||||
{
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace Foo\Bar
|
||||
{
|
||||
class TestClassInBar
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
namespace Foo\Baz
|
||||
{
|
||||
class TestClassInBaz
|
||||
{
|
||||
}
|
||||
}
|
13
vendor/phpunit/php-token-stream/tests/_fixture/php-code-coverage-issue-424.php
vendored
Normal file
13
vendor/phpunit/php-token-stream/tests/_fixture/php-code-coverage-issue-424.php
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class Example
|
||||
{
|
||||
public function even($numbers)
|
||||
{
|
||||
$numbers = array_filter($numbers, function($number) {
|
||||
return $number % 2 === 0;
|
||||
});
|
||||
|
||||
return array_merge($numbers);
|
||||
}
|
||||
}
|
36
vendor/phpunit/php-token-stream/tests/_fixture/source.php
vendored
Normal file
36
vendor/phpunit/php-token-stream/tests/_fixture/source.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Some comment
|
||||
*/
|
||||
class Foo{function foo(){}
|
||||
|
||||
/**
|
||||
* @param Baz $baz
|
||||
*/
|
||||
public function bar(Baz $baz)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Foobar $foobar
|
||||
*/
|
||||
static public function foobar(Foobar $foobar)
|
||||
{
|
||||
}
|
||||
|
||||
public function barfoo(Barfoo $barfoo)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* This docblock does not belong to the baz function
|
||||
*/
|
||||
|
||||
public function baz()
|
||||
{
|
||||
}
|
||||
|
||||
public function blaz($x, $y)
|
||||
{
|
||||
}
|
||||
}
|
6
vendor/phpunit/php-token-stream/tests/_fixture/source2.php
vendored
Normal file
6
vendor/phpunit/php-token-stream/tests/_fixture/source2.php
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
// short desc
|
||||
abstract class A {
|
||||
/* abst meth: */
|
||||
public static abstract function method();
|
||||
}
|
14
vendor/phpunit/php-token-stream/tests/_fixture/source3.php
vendored
Normal file
14
vendor/phpunit/php-token-stream/tests/_fixture/source3.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// This file is example#1
|
||||
// from http://www.php.net/manual/en/function.get-included-files.php
|
||||
|
||||
include 'test1.php';
|
||||
include_once 'test2.php';
|
||||
require 'test3.php';
|
||||
require_once 'test4.php';
|
||||
|
||||
$included_files = get_included_files();
|
||||
|
||||
foreach ($included_files as $filename) {
|
||||
echo "$filename\n";
|
||||
}
|
30
vendor/phpunit/php-token-stream/tests/_fixture/source4.php
vendored
Normal file
30
vendor/phpunit/php-token-stream/tests/_fixture/source4.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// Declare the interface 'iTemplate'
|
||||
interface iTemplate
|
||||
{
|
||||
public function setVariable($name, $var);
|
||||
public function
|
||||
getHtml($template);
|
||||
}
|
||||
|
||||
interface a
|
||||
{
|
||||
public function foo();
|
||||
}
|
||||
|
||||
interface b extends a
|
||||
{
|
||||
public function baz(Baz $baz);
|
||||
}
|
||||
|
||||
// short desc for class that implement a unique interface
|
||||
class c implements b
|
||||
{
|
||||
public function foo()
|
||||
{
|
||||
}
|
||||
|
||||
public function baz(Baz $baz)
|
||||
{
|
||||
}
|
||||
}
|
5
vendor/phpunit/php-token-stream/tests/_fixture/source5.php
vendored
Normal file
5
vendor/phpunit/php-token-stream/tests/_fixture/source5.php
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
function foo($a, array $b, array $c = array()) {}
|
||||
interface i { public function m($a, array $b, array $c = array()); }
|
||||
abstract class a { abstract public function m($a, array $b, array $c = array()); }
|
||||
class c { public function m($a, array $b, array $c = array()) {} }
|
Reference in New Issue
Block a user