first commit

This commit is contained in:
root
2022-03-06 11:49:27 +00:00
commit 1984e55837
1387 changed files with 121949 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<?php
namespace Foo\Bar;
class Baz {}
namespace Other\Space;
class Extender extends \Foo\Bar\Baz {}

View File

@ -0,0 +1,6 @@
<?php
namespace Foo\Bar;
class TestClass
{
}

View File

@ -0,0 +1,9 @@
<?php
namespace Foo\BarScoped {
class TestClass {
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace foo;
use function bar\baz;
class Foo
{
}

View File

@ -0,0 +1,7 @@
<?php
class class_with_method_named_empty
{
public function empty(): void
{
}
}

View File

@ -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 {};
}
}

View File

@ -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;
}
}

View File

@ -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;
};
}
}

View 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() {};

View File

@ -0,0 +1,3 @@
<?php
class TestClass {
}

View File

@ -0,0 +1,8 @@
<?php
class Foo
{
public function bar()
{
return Foo::CLASS;
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace Foo\Bar;
class TestClassInBar
{
}
namespace Foo\Baz;
class TestClassInBaz
{
}

View File

@ -0,0 +1,14 @@
<?php
namespace Foo\Bar
{
class TestClassInBar
{
}
}
namespace Foo\Baz
{
class TestClassInBaz
{
}
}

View 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);
}
}

View 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)
{
}
}

View File

@ -0,0 +1,6 @@
<?php
// short desc
abstract class A {
/* abst meth: */
public static abstract function method();
}

View 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";
}

View 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)
{
}
}

View 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()) {} }