php

package
v0.0.0-...-6d13ae5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package php implements compilecheck for PHP.

The snippet generation process derives its information from the discovery doc that should work with the client library. We perform a "compile check" by extracting the type information from the client library documentation, and making sure it matches the types we deduced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(files []string, libDir, testDir string) (string, error)

Check sets up the environment, parses information from the PHP client library and generates the PHP files that are used for the compile check.

Types

type MethodSignature

type MethodSignature struct {
	Identifier string
	Path       string
	Method     string
	Params     []string
}

MethodSignature contains information of the method from the sample snippet.

type ParameterPath

type ParameterPath struct {
	ClassName, MethodName, ParameterName string
}

ParameterPath contains the path (class->method->parameter) used to identify the corresponding parameter type.

type ParsedLib

type ParsedLib []PathTypePair

ParsedLib is an array of PathTypePair which represents the parameter information parsed from the given library.

type PathTypePair

type PathTypePair struct {
	Path  ParameterPath
	Types []string
}

PathTypePair represents the parsed parameter information (name and types) of methods in the classes. The structure looks like this: Path unique path to the parameter (class x method x parameter name) Types parameter types array (Some parameters may allow more than one type)

type Sample

type Sample struct {
	Service         string
	InitLines       []string
	MethodSignature MethodSignature
}

Sample represents a parsed sample snippet.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL