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()
291291 */
292292 public function addExtend ($ type )
293293 {
294+ $ this ->extends = (array ) $ this ->extends ;
294295 $ this ->extends [] = (string ) $ type ;
295296 return $ this ;
296297 }
@@ -428,7 +429,7 @@ public function setProperties(array $props)
428429 {
429430 foreach ($ props as $ v ) {
430431 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[]. ' );
432433 }
433434 }
434435 $ this ->properties = $ props ;
@@ -465,7 +466,7 @@ public function setMethods(array $methods)
465466 {
466467 foreach ($ methods as $ v ) {
467468 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[]. ' );
469470 }
470471 }
471472 $ this ->methods = $ methods ;
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public function setParameters(array $val)
142142 {
143143 foreach ($ val as $ v ) {
144144 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[]. ' );
146146 }
147147 }
148148 $ this ->parameters = $ val ;
You can’t perform that action at this time.
0 commit comments