Implement ObjectProxy class

This commit is contained in:
Dan Jones 2021-10-15 10:43:30 -05:00
commit d857775289
10 changed files with 417 additions and 79 deletions

View file

@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace Danjones000\Test\Spy\Fixtures;
class Example
{
protected const PROT_CONST = 2;
private const PRIV_CONST = 3;
protected static int $protStatic = 4;
private static int $privStatic = 5;
protected int $prot = 6;
private int $priv = 7;
public static function reset(): void
{
static::$protStatic = 4;
static::$privStatic = 5;
}
protected function protMethod(): int
{
return $this->prot;
}
private function privMethod(int $priv): void
{
$this->priv = $priv;
}
protected static function protStatMethod(int $protStatic): void
{
static::$protStatic = $protStatic;
}
private static function privStatMethod(): int
{
return static::$privStatic;
}
}