public function getPlatformRequirements($withDevReqs = false)
    {
        $lockData = $this->getLockData();
        $versionParser = new VersionParser();
        $requirements = array();

        if (!empty($lockData['platform'])) {
            $requirements = $versionParser->parseLinks(
                '__ROOT__',
                '1.0.0',
                'requires',
                isset($lockData['platform']) ? $lockData['platform'] : array()
            );
        }

        if ($withDevReqs && !empty($lockData['platform-dev'])) {
            $devRequirements = $versionParser->parseLinks(
                '__ROOT__',
                '1.0.0',
                'requires',
                isset($lockData['platform-dev']) ? $lockData['platform-dev'] : array()
            );

            $requirements = array_merge($requirements, $devRequirements);
        }

        return $requirements;
    }
public function getPlatformRequirements($withDevReqs = false)
    {
        $lockData = $this->getLockData();
        $versionParser = new VersionParser();
        $requirements = array();

        if (!empty($lockData['platform'])) {
            $requirements = $versionParser->parseLinks(
                '__ROOT__',
                '1.0.0',
                'requires',
                isset($lockData['platform']) ? $lockData['platform'] : array()
            );
        }

        if ($withDevReqs && !empty($lockData['platform-dev'])) {
            $devRequirements = $versionParser->parseLinks(
                '__ROOT__',
                '1.0.0',
                'requires',
                isset($lockData['platform-dev']) ? $lockData['platform-dev'] : array()
            );

            $requirements = array_merge($requirements, $devRequirements);
        }

        return $requirements;
    }
public function getPlatformRequirements ( $ withDevReqs = false ) { $ lockData = $ this -> getLockData ( ) ; $ versionParser = new VersionParser ( ) ; $ requirements = array ( ) ; if ( ! empty ( $ lockData [ 'platform' ] ) ) { $ requirements = $ versionParser -> parseLinks ( '__ROOT__' , '1.0.0' , 'requires' , isset ( $ lockData [ 'platform' ] ) ? $ lockData [ 'platform' ] : array ( ) ) ; } if ( $ withDevReqs && ! empty ( $ lockData [ 'platform-dev' ] ) ) { $ devRequirements = $ versionParser -> parseLinks ( '__ROOT__' , '1.0.0' , 'requires' , isset ( $ lockData [ 'platform-dev' ] ) ? $ lockData [ 'platform-dev' ] : array ( ) ) ; $ requirements = array_merge ( $ requirements , $ devRequirements ) ; } return $ requirements ; }
Returns the platform requirements stored in the lock file

@param  bool                     $withDevReqs if true, the platform requirements from the require-dev block are also returned
@return \Composer\Package\Link[]
Returns the platform requirements stored in the lock file