File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ public function getExtends()
291
291
*/
292
292
public function addExtend ($ type )
293
293
{
294
+ $ this ->extends = (array ) $ this ->extends ;
294
295
$ this ->extends [] = (string ) $ type ;
295
296
return $ this ;
296
297
}
@@ -428,7 +429,7 @@ public function setProperties(array $props)
428
429
{
429
430
foreach ($ props as $ v ) {
430
431
if (!$ v instanceof Property) {
431
- throw new Exception ('Argument must be Nette\PhpGenerator\Property[]. ' );
432
+ throw new Nette \ InvalidArgumentException ('Argument must be Nette\PhpGenerator\Property[]. ' );
432
433
}
433
434
}
434
435
$ this ->properties = $ props ;
@@ -465,7 +466,7 @@ public function setMethods(array $methods)
465
466
{
466
467
foreach ($ methods as $ v ) {
467
468
if (!$ v instanceof Method) {
468
- throw new Exception ('Argument must be Nette\PhpGenerator\Method[]. ' );
469
+ throw new Nette \ InvalidArgumentException ('Argument must be Nette\PhpGenerator\Method[]. ' );
469
470
}
470
471
}
471
472
$ this ->methods = $ methods ;
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public function setParameters(array $val)
142
142
{
143
143
foreach ($ val as $ v ) {
144
144
if (!$ v instanceof Parameter) {
145
- throw new Exception ('Argument must be Nette\PhpGenerator\Parameter[]. ' );
145
+ throw new Nette \ InvalidArgumentException ('Argument must be Nette\PhpGenerator\Parameter[]. ' );
146
146
}
147
147
}
148
148
$ this ->parameters = $ val ;
You can’t perform that action at this time.
0 commit comments