XBRL-Equality.php
public static function divide_equal( $d1, $d2, &$types, &$namespaces )
	{
		if ( is_null( $d1 ) && is_null( $d2 ) ) return true;
		if ( is_null( $d1 ) || is_null( $d2 ) ) return false;

		// Check the arrays have the same elements
		$result = XBRL_Equality::matchedKeyNames( $d1, $d2, array( 'denominator', 'numerator' ) );

		// if ( $result === false || ! is_array( $result ) || ! count( $result ) ) return false;
		if ( $result === false || ! is_array( $result ) ) return false;
		if ( ! count( $result ) ) return true;

		foreach ( $result as $elementName )
		{
			switch ( $elementName )
			{
				case 'denominator':

					if ( ! XBRL_Equality::measures_equal( $d1['denominator'], $d2['denominator'], $types, $namespaces ) )
					{
						return false;
					}

					break;

				case 'numerator':

					if ( ! XBRL_Equality::measures_equal( $d1['numerator'], $d2['numerator'], $types, $namespaces ) )
					{
						return false;
					}

					break;
			}
		}

		return true;
	}
public static function divide_equal( $d1, $d2, &$types, &$namespaces )
	{
		if ( is_null( $d1 ) && is_null( $d2 ) ) return true;
		if ( is_null( $d1 ) || is_null( $d2 ) ) return false;

		// Check the arrays have the same elements
		$result = XBRL_Equality::matchedKeyNames( $d1, $d2, array( 'denominator', 'numerator' ) );

		// if ( $result === false || ! is_array( $result ) || ! count( $result ) ) return false;
		if ( $result === false || ! is_array( $result ) ) return false;
		if ( ! count( $result ) ) return true;

		foreach ( $result as $elementName )
		{
			switch ( $elementName )
			{
				case 'denominator':

					if ( ! XBRL_Equality::measures_equal( $d1['denominator'], $d2['denominator'], $types, $namespaces ) )
					{
						return false;
					}

					break;

				case 'numerator':

					if ( ! XBRL_Equality::measures_equal( $d1['numerator'], $d2['numerator'], $types, $namespaces ) )
					{
						return false;
					}

					break;
			}
		}

		return true;
	}
public static function divide_equal ( $ d1 , $ d2 , & $ types , & $ namespaces ) { if ( is_null ( $ d1 ) && is_null ( $ d2 ) ) return true ; if ( is_null ( $ d1 ) || is_null ( $ d2 ) ) return false ; // Check the arrays have the same elements
 $ result = XBRL_Equality :: matchedKeyNames ( $ d1 , $ d2 , array ( 'denominator' , 'numerator' ) ) ; // if ( $result === false || ! is_array( $result ) || ! count( $result ) ) return false;
 if ( $ result === false || ! is_array ( $ result ) ) return false ; if ( ! count ( $ result ) ) return true ; foreach ( $ result as $ elementName ) { switch ( $ elementName ) { case 'denominator' : if ( ! XBRL_Equality :: measures_equal ( $ d1 [ 'denominator' ] , $ d2 [ 'denominator' ] , $ types , $ namespaces ) ) { return false ; } break ; case 'numerator' : if ( ! XBRL_Equality :: measures_equal ( $ d1 [ 'numerator' ] , $ d2 [ 'numerator' ] , $ types , $ namespaces ) ) { return false ; } break ; } } return true ; }
Make sure divide definitions are equal

@param array $d1			An array of numerator and denominator elements
@param array $d2			An array of numerator and denominator elements
@param array $types		A reference to the global XBRL_Types instance
@param array $namespaces A list of the namespaces in the current document
@return false|array
Make sure divide definitions are equal