Skip to content

Commit 003ca51

Browse files
committed
removed deprecated stuff
1 parent f1c87f2 commit 003ca51

File tree

2 files changed

+0
-48
lines changed

2 files changed

+0
-48
lines changed

src/PhpGenerator/ClassManipulator.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,4 @@ private function implementProperty(\ReflectionProperty $rp): Property
121121
$this->class->addMember($property);
122122
return $property;
123123
}
124-
125-
126-
/** @deprecated use implement() */
127-
public function implementInterface(string $interfaceName): void
128-
{
129-
trigger_error(__METHOD__ . '() is deprecated, use implement()', E_USER_DEPRECATED);
130-
$this->implement($interfaceName);
131-
}
132124
}

src/PhpGenerator/ClassType.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,6 @@ final class ClassType extends ClassLike
3939
private array $implements = [];
4040

4141

42-
/** @deprecated create object using 'new Nette\PhpGenerator\ClassType' */
43-
public static function class(?string $name): self
44-
{
45-
trigger_error(__METHOD__ . "() is deprecated, create object using 'new Nette\\PhpGenerator\\ClassType", E_USER_DEPRECATED);
46-
return new self($name);
47-
}
48-
49-
50-
/** @deprecated create object using 'new Nette\PhpGenerator\InterfaceType' */
51-
public static function interface(string $name): InterfaceType
52-
{
53-
trigger_error(__METHOD__ . "() is deprecated, create object using 'new Nette\\PhpGenerator\\InterfaceType'", E_USER_DEPRECATED);
54-
return new InterfaceType($name);
55-
}
56-
57-
58-
/** @deprecated create object using 'new Nette\PhpGenerator\TraitType' */
59-
public static function trait(string $name): TraitType
60-
{
61-
trigger_error(__METHOD__ . "() is deprecated, create object using 'new Nette\\PhpGenerator\\TraitType'", E_USER_DEPRECATED);
62-
return new TraitType($name);
63-
}
64-
65-
66-
/** @deprecated create object using 'new Nette\PhpGenerator\EnumType' */
67-
public static function enum(string $name): EnumType
68-
{
69-
trigger_error(__METHOD__ . "() is deprecated, create object using 'new Nette\\PhpGenerator\\EnumType'", E_USER_DEPRECATED);
70-
return new EnumType($name);
71-
}
72-
73-
7442
public function __construct(?string $name = null, ?PhpNamespace $namespace = null)
7543
{
7644
if ($name === null) {
@@ -82,14 +50,6 @@ public function __construct(?string $name = null, ?PhpNamespace $namespace = nul
8250
}
8351

8452

85-
/** @deprecated */
86-
public function getType(): string
87-
{
88-
trigger_error(__METHOD__ . "() is deprecated, method always returns 'class'", E_USER_DEPRECATED);
89-
return self::TYPE_CLASS;
90-
}
91-
92-
9353
public function setFinal(bool $state = true): static
9454
{
9555
$this->final = $state;

0 commit comments

Comments
 (0)