This commit is contained in:
aschwarz
2023-05-12 12:27:19 +02:00
parent 757c2388de
commit e2f1846f03
1974 changed files with 255998 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace DeepCopy\f001;
class A
{
private $aProp;
public function getAProp()
{
return $this->aProp;
}
public function setAProp($prop)
{
$this->aProp = $prop;
return $this;
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace DeepCopy\f001;
class B extends A
{
private $bProp;
public function getBProp()
{
return $this->bProp;
}
public function setBProp($prop)
{
$this->bProp = $prop;
return $this;
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace DeepCopy\f002;
class A
{
private $prop1;
private $prop2;
public function getProp1()
{
return $this->prop1;
}
public function setProp1($prop)
{
$this->prop1 = $prop;
return $this;
}
public function getProp2()
{
return $this->prop2;
}
public function setProp2($prop)
{
$this->prop2 = $prop;
return $this;
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace DeepCopy\f003;
class Foo
{
private $name;
private $prop;
public function __construct($name)
{
$this->name = $name;
}
public function getProp()
{
return $this->prop;
}
public function setProp($prop)
{
$this->prop = $prop;
return $this;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace DeepCopy\f004;
use BadMethodCallException;
class UnclonableItem
{
private function __clone()
{
throw new BadMethodCallException('Unsupported call.');
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace DeepCopy\f005;
class Foo
{
public $cloned = false;
public function __clone()
{
$this->cloned = true;
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace DeepCopy\f006;
class A
{
public $cloned = false;
private $aProp;
public function getAProp()
{
return $this->aProp;
}
public function setAProp($prop)
{
$this->aProp = $prop;
return $this;
}
public function __clone()
{
$this->cloned = true;
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace DeepCopy\f006;
class B
{
public $cloned = false;
private $bProp;
public function getBProp()
{
return $this->bProp;
}
public function setBProp($prop)
{
$this->bProp = $prop;
return $this;
}
public function __clone()
{
$this->cloned = true;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace DeepCopy\f007;
use DateInterval;
class FooDateInterval extends DateInterval
{
public $cloned = false;
public function __clone()
{
$this->cloned = true;
}
}

View File

@ -0,0 +1,15 @@
<?php
namespace DeepCopy\f007;
use DateTimeZone;
class FooDateTimeZone extends DateTimeZone
{
public $cloned = false;
public function __clone()
{
$this->cloned = true;
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace DeepCopy\f008;
class A
{
private $foo;
public function __construct($foo)
{
$this->foo = $foo;
}
public function getFoo()
{
return $this->foo;
}
}

View File

@ -0,0 +1,7 @@
<?php
namespace DeepCopy\f008;
class B extends A
{
}