src/Composer/Composer.php
public static function getComposerJson( $directory ) {
		$composer_json = $directory . DIRECTORY_SEPARATOR . 'composer.json';

		if ( ! file_exists( $composer_json ) ) {
			return null;
		}

		$composer = @json_decode( file_get_contents( $composer_json ), true );

		if ( ! $composer ) {
			return null;
		}

		return $composer;
	}
public static function getComposerJson( $directory ) {
		$composer_json = $directory . DIRECTORY_SEPARATOR . 'composer.json';

		if ( ! file_exists( $composer_json ) ) {
			return null;
		}

		$composer = @json_decode( file_get_contents( $composer_json ), true );

		if ( ! $composer ) {
			return null;
		}

		return $composer;
	}
public static function getComposerJson ( $ directory ) { $ composer_json = $ directory . DIRECTORY_SEPARATOR . 'composer.json' ; if ( ! file_exists ( $ composer_json ) ) { return null ; } $ composer = @ json_decode ( file_get_contents ( $ composer_json ) , true ) ; if ( ! $ composer ) { return null ; } return $ composer ; }
Load and parse a composer.json file from a directory

@param  string     $directory
@return array|null
Load and parse a composer . json file from a directory