Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Definition/CompilerDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ protected function processParams(&$def, Reflection\ClassReflection $rClass, Refl
$def['parameters'][$methodName][$fqName][] = $actualParamName;
$def['parameters'][$methodName][$fqName][] = ($p->getClass() !== null) ? $p->getClass()->getName() : null;
$def['parameters'][$methodName][$fqName][] = !($optional =$p->isOptional());
$def['parameters'][$methodName][$fqName][] = $optional ? $p->getDefaultValue() : null;
$def['parameters'][$methodName][$fqName][] = $optional && $p->isDefaultValueAvailable() ? $p->getDefaultValue() : null;
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/Definition/RuntimeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function processParams(&$def, Reflection\ClassReflection $rClass, Refl
// set the class name, if it exists
$def['parameters'][$methodName][$fqName][] = $actualParamName;
$def['parameters'][$methodName][$fqName][] = ($p->getClass() !== null) ? $p->getClass()->getName() : null;
$def['parameters'][$methodName][$fqName][] = !($optional =$p->isOptional() && $p->isDefaultValueAvailable());
$def['parameters'][$methodName][$fqName][] = !($optional = $p->isOptional() && $p->isDefaultValueAvailable());
$def['parameters'][$methodName][$fqName][] = $optional ? $p->getDefaultValue() : null;
}

Expand Down
15 changes: 15 additions & 0 deletions test/TestAsset/CompilerClasses/F.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Di
*/

namespace ZendTest\Di\TestAsset\CompilerClasses;

class F extends \Exception
{
}

0 comments on commit 24a5c98

Please # to comment.