Skip to content

Commit

Permalink
Remove OPTIONS_INTERFACE in favor of Options::class
Browse files Browse the repository at this point in the history
  • Loading branch information
dosten committed Apr 18, 2015
1 parent 73853c4 commit a683891
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Symfony/Component/OptionsResolver/OptionsResolver.php
Expand Up @@ -26,13 +26,6 @@
*/
class OptionsResolver implements Options
{
/**
* The fully qualified name of the {@link Options} interface.
*
* @internal
*/
const OPTIONS_INTERFACE = 'Symfony\\Component\\OptionsResolver\\Options';

/**
* The names of all defined options.
*
Expand Down Expand Up @@ -171,7 +164,7 @@ public function setDefault($option, $value)
$reflClosure = new \ReflectionFunction($value);
$params = $reflClosure->getParameters();

if (isset($params[0]) && null !== ($class = $params[0]->getClass()) && self::OPTIONS_INTERFACE === $class->name) {
if (isset($params[0]) && null !== ($class = $params[0]->getClass()) && Options::class === $class->name) {
// Initialize the option if no previous value exists
if (!isset($this->defaults[$option])) {
$this->defaults[$option] = null;
Expand Down

0 comments on commit a683891

Please sign in to comment.