refactor: Cleanup git state - commit all staged changes
Major refactoring cleanup: - Add new controller architecture (class-controller-*.php) - Add new settings-v2 UI (views/settings-v2/) - Add new CSS architecture (agentic-sidebar.css, tokens) - Add esbuild build pipeline (scripts/build.js, package.json) - Add composer dependencies (vendor/) - Add frontend src directory (assets/js/src/index.jsx) - Add documentation files - Remove old/obsolete files (class-settings.php, old CSS) This commits all pending changes from previous refactoring efforts.
This commit is contained in:
15
vendor/phpdocumentor/reflection/tests/integration/data/Enums/EnumConsumer.php
vendored
Normal file
15
vendor/phpdocumentor/reflection/tests/integration/data/Enums/EnumConsumer.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MyNamespace;
|
||||
|
||||
class EnumConsumer
|
||||
{
|
||||
public MyEnum $myEnum = MyEnum::VALUE1;
|
||||
|
||||
public function consume(MyEnum $enum = MyEnum::VALUE1): MyEnum
|
||||
{
|
||||
$this->myEnum = $enum;
|
||||
}
|
||||
}
|
||||
11
vendor/phpdocumentor/reflection/tests/integration/data/Enums/backedEnum.php
vendored
Normal file
11
vendor/phpdocumentor/reflection/tests/integration/data/Enums/backedEnum.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MyNamespace;
|
||||
|
||||
enum MyBackedEnum : string
|
||||
{
|
||||
case VALUE1 = 'this is value1';
|
||||
case VALUE2 = 'this is value2';
|
||||
}
|
||||
11
vendor/phpdocumentor/reflection/tests/integration/data/Enums/base.php
vendored
Normal file
11
vendor/phpdocumentor/reflection/tests/integration/data/Enums/base.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MyNamespace;
|
||||
|
||||
enum MyEnum
|
||||
{
|
||||
case VALUE1;
|
||||
case VALUE2;
|
||||
}
|
||||
12
vendor/phpdocumentor/reflection/tests/integration/data/Enums/enumWithConstant.php
vendored
Normal file
12
vendor/phpdocumentor/reflection/tests/integration/data/Enums/enumWithConstant.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MyNamespace;
|
||||
|
||||
enum MyEnumWithConstant
|
||||
{
|
||||
public const MYCONST = 'MyConstValue';
|
||||
|
||||
public const INT_CONST = 0;
|
||||
}
|
||||
22
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/conditional_function.php
vendored
Normal file
22
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/conditional_function.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
if (!function_exists('h')) {
|
||||
function h() {
|
||||
|
||||
}
|
||||
} elseif(!function_exists('i')) {
|
||||
if (true) {
|
||||
function i()
|
||||
{
|
||||
}
|
||||
}
|
||||
} else {
|
||||
function j() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function a() {
|
||||
|
||||
}
|
||||
16
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/docblock_followed_by_html.php
vendored
Normal file
16
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/docblock_followed_by_html.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
?>
|
||||
<h1>Test</h1>
|
||||
<?php
|
||||
|
||||
require 'Pizza.php';
|
||||
13
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty.php
vendored
Normal file
13
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
require 'Pizza.php';
|
||||
15
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty_shebang.php
vendored
Normal file
15
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty_shebang.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/php
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
require 'Pizza.php';
|
||||
14
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty_with_declare.php
vendored
Normal file
14
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty_with_declare.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
require 'Pizza.php';
|
||||
14
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty_with_html.php
vendored
Normal file
14
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/empty_with_html.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<h1>Test</h1>
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
require 'Pizza.php';
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Acme\Plugin;
|
||||
|
||||
function foo( $output = Plugin::class ) {}
|
||||
|
||||
function bar( $output = OBJECT ) {}
|
||||
23
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/global_namspaced_function.php
vendored
Normal file
23
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/global_namspaced_function.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* setup.php - Document the file.
|
||||
*
|
||||
* File long description goes here.
|
||||
*
|
||||
* @author Test Sample
|
||||
*/
|
||||
|
||||
namespace {
|
||||
/**
|
||||
* autoloader function.
|
||||
*
|
||||
* Function long description goes here.
|
||||
*
|
||||
* @param string $class Namespaced class name
|
||||
* @return void
|
||||
*/
|
||||
function libAutoload($class){
|
||||
echo 'Do something';
|
||||
}
|
||||
spl_autoload_register('libAutoload');
|
||||
}
|
||||
11
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/inline_function.php
vendored
Normal file
11
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/inline_function.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
public function test() {
|
||||
function internal() {
|
||||
return "yep";
|
||||
}
|
||||
|
||||
return internal();
|
||||
}
|
||||
}
|
||||
15
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/psr12.php
vendored
Normal file
15
vendor/phpdocumentor/reflection/tests/integration/data/GlobalFiles/psr12.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'Pizza.php';
|
||||
21
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/ExampleNestedTrait.php
vendored
Normal file
21
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/ExampleNestedTrait.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace Luigi {
|
||||
|
||||
trait ExampleNestedTrait
|
||||
{
|
||||
private function exampleTraitMethod()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
17
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/Packing.php
vendored
Normal file
17
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/Packing.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace Luigi;
|
||||
|
||||
interface Packing extends \Packing
|
||||
{
|
||||
}
|
||||
99
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/Pizza.php
vendored
Normal file
99
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/Pizza.php
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
// phpcs:ignoreFile
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace Luigi;
|
||||
|
||||
use Luigi\Pizza\Sauce;
|
||||
use Luigi\Pizza\TomatoSauce;
|
||||
|
||||
#[\Food("Pizza")]
|
||||
#[\Food(country: "Italy", originDate: Pizza::class)]
|
||||
class Pizza extends \Pizza
|
||||
{
|
||||
const
|
||||
/** @var string DELIVERY designates that the delivery method is to deliver the pizza to the customer. */
|
||||
DELIVERY = 'delivery',
|
||||
/** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
|
||||
PICKUP = 'pickup';
|
||||
|
||||
use ExampleNestedTrait;
|
||||
|
||||
/** @var static contains the active instance for this Pizza. */
|
||||
static private $instance;
|
||||
|
||||
/**
|
||||
* @var Pizza\Style $style
|
||||
* @var Pizza\Sauce|null $sauce
|
||||
* @var Pizza\Topping[] $toppings
|
||||
*/
|
||||
private $style, $sauce, $toppings;
|
||||
|
||||
/**
|
||||
* The size of the pizza in centimeters, defaults to 20cm.
|
||||
*/
|
||||
public int $size = \Luigi\Pizza\SIZE_20CM;
|
||||
|
||||
var $legacy; // don't use this anymore!
|
||||
|
||||
protected
|
||||
/** @var string $packaging The type of packaging for this Pizza */
|
||||
$packaging = self::PACKAGING,
|
||||
/** @var string $deliveryMethod Is the customer picking this pizza up or must it be delivered? */
|
||||
$deliveryMethod;
|
||||
|
||||
private function __construct(Pizza\Style $style, Sauce|null $sauce = null)
|
||||
{
|
||||
$this->style = $style;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance of a Pizza.
|
||||
*
|
||||
* This method can be used to instantiate a new object of this class which can then be retrieved using
|
||||
* {@see self::getInstance()}.
|
||||
*
|
||||
* @param Pizza\Style $style
|
||||
*
|
||||
* @see self::getInstance to retrieve the pizza object.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function createInstance(Pizza\Style $style)
|
||||
{
|
||||
self::$instance = new static($style);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
static function getInstance()
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
final public function setSauce(Pizza\Sauce $sauce)
|
||||
{
|
||||
$this->sauce = $sauce;
|
||||
}
|
||||
|
||||
final public function addTopping(Pizza\Topping $topping)
|
||||
{
|
||||
$this->toppings[] = $topping;
|
||||
}
|
||||
|
||||
public function setSize(&$size = \Luigi\Pizza\SIZE_20CM)
|
||||
{
|
||||
}
|
||||
|
||||
public function getPrice()
|
||||
{
|
||||
}
|
||||
}
|
||||
26
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/StyleFactory.php
vendored
Normal file
26
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/StyleFactory.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace Luigi;
|
||||
|
||||
use Luigi\Pizza\PizzaComponentFactory;
|
||||
|
||||
final class StyleFactory extends PizzaComponentFactory
|
||||
{
|
||||
public function getPrice()
|
||||
{
|
||||
}
|
||||
|
||||
protected function calculatePrice()
|
||||
{
|
||||
}
|
||||
}
|
||||
27
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/Valued.php
vendored
Normal file
27
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/Valued.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// phpcs:ignoreFile
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace Luigi;
|
||||
|
||||
/**
|
||||
* Any class implementing this interface has an associated price.
|
||||
*
|
||||
* Using this interface we can easily add the price of all components in a pizza by checking for this interface and
|
||||
* adding the prices together for all components.
|
||||
*/
|
||||
interface Valued
|
||||
{
|
||||
const BASE_PRICE = 1;
|
||||
|
||||
function getPrice();
|
||||
}
|
||||
14
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/constants.php
vendored
Normal file
14
vendor/phpdocumentor/reflection/tests/integration/data/Luigi/constants.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Luigi;
|
||||
|
||||
const OVEN_TEMPERATURE = 9001;
|
||||
define('\\Luigi\\MAX_OVEN_TEMPERATURE', 9002);
|
||||
define('OUTSIDE_OVEN_TEMPERATURE', 9002);
|
||||
define(__NAMESPACE__ . 'Foo\\_OUTSIDE_OVEN_TEMPERATURE', 9002);
|
||||
$v = 1;
|
||||
define($v . '_OUTSIDE_OVEN_TEMPERATURE', 9002);
|
||||
|
||||
function in_function_define(){
|
||||
define('IN_FUNCTION_OVEN_TEMPERATURE', 9003);
|
||||
}
|
||||
32
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/ConstructorPromotion.php
vendored
Normal file
32
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/ConstructorPromotion.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PHP8;
|
||||
|
||||
use DateTimeImmutable;
|
||||
|
||||
class ConstructorPromotion
|
||||
{
|
||||
private const DEFAULT_VALUE = 'default';
|
||||
|
||||
/**
|
||||
* Constructor with promoted properties
|
||||
*
|
||||
* @param string $name my docblock name
|
||||
*/
|
||||
public function __construct(
|
||||
/**
|
||||
* Summary
|
||||
*
|
||||
* Description
|
||||
*
|
||||
* @var string $name property description
|
||||
*/
|
||||
public string $name = 'default name',
|
||||
protected Email $email = new Email(),
|
||||
private DateTimeImmutable $birth_date,
|
||||
private DateTimeImmutable $created_at = new DateTimeImmutable('now'),
|
||||
private array $uses_constants = [self::DEFAULT_VALUE],
|
||||
) {}
|
||||
}
|
||||
20
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/MixedType.php
vendored
Normal file
20
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/MixedType.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PHP8;
|
||||
|
||||
class MixedType
|
||||
{
|
||||
public mixed $property;
|
||||
|
||||
public function getProperty(): mixed
|
||||
{
|
||||
return $this->property;
|
||||
}
|
||||
|
||||
public function setProperty(mixed $value): void
|
||||
{
|
||||
$this->property = $value;
|
||||
}
|
||||
}
|
||||
21
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/StaticType.php
vendored
Normal file
21
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/StaticType.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PHP8;
|
||||
|
||||
class StaticType
|
||||
{
|
||||
//Static is not allowed here
|
||||
public static $property;
|
||||
|
||||
public function getProperty(): static
|
||||
{
|
||||
return $this->property;
|
||||
}
|
||||
|
||||
public function setProperty($value): void
|
||||
{
|
||||
$this->property = $value;
|
||||
}
|
||||
}
|
||||
17
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/UnionTypes.php
vendored
Normal file
17
vendor/phpdocumentor/reflection/tests/integration/data/PHP8/UnionTypes.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PHP8;
|
||||
|
||||
use Foo\Date;
|
||||
|
||||
class UnionTypes
|
||||
{
|
||||
private string|null|false $property;
|
||||
|
||||
public function union(int|false $test): string|null|Date
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
14
vendor/phpdocumentor/reflection/tests/integration/data/PHP83/TypedConstants.php
vendored
Normal file
14
vendor/phpdocumentor/reflection/tests/integration/data/PHP83/TypedConstants.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PHP83;
|
||||
|
||||
class TypedConstants
|
||||
{
|
||||
const string NAME = 'typed';
|
||||
const int COUNT = 42;
|
||||
const string|int UNION = 'either';
|
||||
const ?string NULLABLE = null;
|
||||
const UNTYPED = 'no type';
|
||||
}
|
||||
8
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/AsymmetricAccessor.php
vendored
Normal file
8
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/AsymmetricAccessor.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class AsymmetricAccessor
|
||||
{
|
||||
private(set) \Pizza $pizza;
|
||||
}
|
||||
10
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/AsymmetricPropertyPromotion.php
vendored
Normal file
10
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/AsymmetricPropertyPromotion.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class AsymmetricPropertyPromotion
|
||||
{
|
||||
public function __construct(
|
||||
protected(set) Pizza $pizza,
|
||||
) {}
|
||||
}
|
||||
15
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/InterfaceProperties.php
vendored
Normal file
15
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/InterfaceProperties.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PHP84;
|
||||
|
||||
interface HasId
|
||||
{
|
||||
public int $id { get; }
|
||||
}
|
||||
|
||||
interface HasName
|
||||
{
|
||||
public string $name { get; set; }
|
||||
}
|
||||
27
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHook.php
vendored
Normal file
27
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHook.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class PropertyHook
|
||||
{
|
||||
private bool $modified = false;
|
||||
|
||||
/** @var string this is my property */
|
||||
#[Property(new DateTimeImmutable())]
|
||||
public string $example = 'default value' {
|
||||
/** Not sure this works, but it gets */
|
||||
#[Getter(new DateTimeImmutable())]
|
||||
get {
|
||||
if ($this->modified) {
|
||||
return $this->foo . ' (modified)';
|
||||
}
|
||||
return $this->foo;
|
||||
}
|
||||
/** Not sure this works, but it sets */
|
||||
#[Setter(new DateTimeImmutable())]
|
||||
set(string|int $value) {
|
||||
$this->foo = strtolower($value);
|
||||
$this->modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHookAsymmetric.php
vendored
Normal file
23
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHookAsymmetric.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class PropertyHook
|
||||
{
|
||||
private bool $modified = false;
|
||||
|
||||
/** @var string this is my property */
|
||||
#[Property(new DateTimeImmutable())]
|
||||
public private(set) string $example = 'default value' {
|
||||
get {
|
||||
if ($this->modified) {
|
||||
return $this->foo . ' (modified)';
|
||||
}
|
||||
return $this->foo;
|
||||
}
|
||||
set(string|int $value) {
|
||||
$this->foo = strtolower($value);
|
||||
$this->modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHookPromotion.php
vendored
Normal file
32
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHookPromotion.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class PropertyHook
|
||||
{
|
||||
private bool $modified = false;
|
||||
|
||||
/** @param string $example this is my property */
|
||||
public function __construct(
|
||||
/** @var string this is my property */
|
||||
#[Property(new DateTimeImmutable())]
|
||||
public string $example = 'default value' {
|
||||
/** Not sure this works, but it gets */
|
||||
#[Getter(new DateTimeImmutable())]
|
||||
get {
|
||||
if ($this->modified) {
|
||||
return $this->foo . ' (modified)';
|
||||
}
|
||||
return $this->foo;
|
||||
}
|
||||
/** Not sure this works, but it sets */
|
||||
#[Setter(new DateTimeImmutable())]
|
||||
set(string|int $value) {
|
||||
$this->foo = strtolower($value);
|
||||
$this->modified = true;
|
||||
}
|
||||
}
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
60
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHookVirtual.php
vendored
Normal file
60
vendor/phpdocumentor/reflection/tests/integration/data/PHP84/PropertyHookVirtual.php
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class PropertyHookVirtual
|
||||
{
|
||||
/**
|
||||
* A virtual property that composes a full name from first and last name
|
||||
*/
|
||||
public string $fullName {
|
||||
// This is a virtual property with a getter
|
||||
// It doesn't reference $this->fullName
|
||||
get {
|
||||
return $this->firstName . ' ' . $this->lastName;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A virtual property that decomposes a full name into first and last name
|
||||
*/
|
||||
public string $compositeName {
|
||||
// This is a virtual property with a setter
|
||||
// It doesn't reference $this->compositeName
|
||||
set(string $value) {
|
||||
[$this->firstName, $this->lastName] = explode(' ', $value, 2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A virtual property with both getter and setter
|
||||
*/
|
||||
public string $completeFullName {
|
||||
// Getter doesn't reference $this->completeFullName
|
||||
get {
|
||||
return $this->firstName . ' ' . $this->lastName;
|
||||
}
|
||||
// Setter doesn't reference $this->completeFullName
|
||||
set(string $value) {
|
||||
[$this->firstName, $this->lastName] = explode(' ', $value, 2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A non-virtual property that references itself in its hook
|
||||
*/
|
||||
public string $nonVirtualName {
|
||||
get {
|
||||
return $this->nonVirtualName ?? $this->firstName;
|
||||
}
|
||||
set(string $value) {
|
||||
$this->nonVirtualName = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public function __construct(
|
||||
private string $firstName = 'John',
|
||||
private string $lastName = 'Doe'
|
||||
) {
|
||||
}
|
||||
}
|
||||
16
vendor/phpdocumentor/reflection/tests/integration/data/Packing.php
vendored
Normal file
16
vendor/phpdocumentor/reflection/tests/integration/data/Packing.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2015-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
interface Packing
|
||||
{
|
||||
public function getName(): string;
|
||||
}
|
||||
29
vendor/phpdocumentor/reflection/tests/integration/data/Pizza.php
vendored
Normal file
29
vendor/phpdocumentor/reflection/tests/integration/data/Pizza.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of phpDocumentor.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @copyright 2010-2018 Mike van Riel<mike@phpdoc.org>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
/**
|
||||
* This needs a docblock to separate from
|
||||
* file docblock
|
||||
*/
|
||||
const OVEN_TEMPERATURE = 9001;
|
||||
define('MAX_OVEN_TEMPERATURE', 9002);
|
||||
|
||||
/**
|
||||
* Pizza base class
|
||||
*/
|
||||
class Pizza
|
||||
{
|
||||
/**
|
||||
* The packaging method used to transport the pizza.
|
||||
*/
|
||||
const PACKAGING = 'box';
|
||||
}
|
||||
8
vendor/phpdocumentor/reflection/tests/integration/data/simpleFunction.php
vendored
Normal file
8
vendor/phpdocumentor/reflection/tests/integration/data/simpleFunction.php
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
function simpleFunction(array $options = []): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
exit();
|
||||
Reference in New Issue
Block a user