src/Argument.php
public function getDefault()
    {
        if ($this->reflection->isDefaultValueAvailable()
            and $default = $this->reflection->getDefaultValue()
        ) {
            if (is_scalar($default)) {
                return $default;
            } else {
                return $this->tostring($default);
            }
        }
        if ($this->reflection->isArray()) {
            return '[]';
        }
        if ($this->isPassedByReference()) {
            return 'null';
        } elseif ($this->reflection->getClass()) {
            // This gets injected as a new instance.
            return null;
        }
        $type = $this->getType();
        if (!$type) {
            $type = $this->extractParameterData();
        }
        // Guesstimated values:
        switch ($type) {
            case 'int': case 'integer': case 'float':
                return 0;
            case 'string':
                return "''";
            case 'array':
                return '[]';
        }
        return null;
    }
public function getDefault()
    {
        if ($this->reflection->isDefaultValueAvailable()
            and $default = $this->reflection->getDefaultValue()
        ) {
            if (is_scalar($default)) {
                return $default;
            } else {
                return $this->tostring($default);
            }
        }
        if ($this->reflection->isArray()) {
            return '[]';
        }
        if ($this->isPassedByReference()) {
            return 'null';
        } elseif ($this->reflection->getClass()) {
            // This gets injected as a new instance.
            return null;
        }
        $type = $this->getType();
        if (!$type) {
            $type = $this->extractParameterData();
        }
        // Guesstimated values:
        switch ($type) {
            case 'int': case 'integer': case 'float':
                return 0;
            case 'string':
                return "''";
            case 'array':
                return '[]';
        }
        return null;
    }
public function getDefault ( ) { if ( $ this -> reflection -> isDefaultValueAvailable ( ) and $ default = $ this -> reflection -> getDefaultValue ( ) ) { if ( is_scalar ( $ default ) ) { return $ default ; } else { return $ this -> tostring ( $ default ) ; } } if ( $ this -> reflection -> isArray ( ) ) { return '[]' ; } if ( $ this -> isPassedByReference ( ) ) { return 'null' ; } elseif ( $ this -> reflection -> getClass ( ) ) { // This gets injected as a new instance. return null ; } $ type = $ this -> getType ( ) ; if ( ! $ type ) { $ type = $ this -> extractParameterData ( ) ; } // Guesstimated values: switch ( $ type ) { case 'int' : case 'integer' : case 'float' : return 0 ; case 'string' : return "''" ; case 'array' : return '[]' ; } return null ; }
Return the default value for the requested parameter.

@return string A stringified version of the default value.
Return the default value for the requested parameter .