, taxes: bool, country: string, development: bool} $facts Plain facts. * @return array Level is "medium" or "low". */ public static function judge( array $facts ): array { $notes = array(); if ( $facts['terms_page'] <= 0 ) { $notes[] = array( 'name' => 'no_terms', 'level' => 'medium', 'context' => '', ); } if ( $facts['privacy_page'] <= 0 ) { $notes[] = array( 'name' => 'no_privacy', 'level' => 'medium', 'context' => '', ); } if ( ! $facts['https'] ) { $notes[] = array( 'name' => 'no_https', 'level' => 'medium', 'context' => '', ); } if ( array() !== $facts['test_gateways'] && ! $facts['development'] ) { $notes[] = array( 'name' => 'test_mode', 'level' => 'medium', 'context' => implode( ', ', $facts['test_gateways'] ), ); } if ( ! $facts['taxes'] ) { $notes[] = array( 'name' => 'no_taxes', 'level' => 'low', 'context' => '', ); } if ( '' === $facts['country'] ) { $notes[] = array( 'name' => 'no_country', 'level' => 'low', 'context' => '', ); } return $notes; } }