Documentation ¶
Index ¶
- Variables
- func IsEmbeddedFunc(name string) bool
- type Class
- func (c *Class) AddDeps(class *Class)
- func (c *Class) AddDepsBy(class *Class)
- func (c *Class) AddExtends(class *Class)
- func (c *Class) AddImplements(class *Class)
- func (c *Class) AddMethod(fn *Function)
- func (c *Class) ClassName() string
- func (c *Class) CountFullyTypedMethods() int64
- func (c *Class) GobDecode(buf []byte) error
- func (c *Class) GobEncode() ([]byte, error)
- func (c *Class) NamespaceName() string
- func (c *Class) Type() string
- type Classes
- func (c *Classes) Add(class *Class)
- func (c *Classes) CountAbstractClasses() int64
- func (c *Classes) CountClasses() int64
- func (c *Classes) CountConcreteClasses() int64
- func (c *Classes) CountIfaces() int64
- func (c *Classes) CountTraits() int64
- func (c *Classes) Get(name string) (*Class, bool)
- func (c *Classes) GetAnyTypeClassByPartOfName(name string) (*Class, error)
- func (c *Classes) GetClassByPartOfName(name string) (*Class, error)
- func (c *Classes) GetFullClassName(name string) ([]string, error)
- func (c *Classes) GetInterfaceByPartOfName(name string) (*Class, error)
- func (c *Classes) GetTraitByPartOfName(name string) (*Class, error)
- func (c *Classes) Len() int
- func (c *Classes) MaxMinAvgCountMagicNumbers() (max, min, avg int64)
- func (c *Classes) MaxMinAvgCyclomaticComplexity() (max, min, avg float64)
- type Constant
- type Constants
- type Field
- type FieldKey
- type Fields
- type File
- func (f *File) AddClass(class *Class)
- func (f *File) AddFunc(fun *Function)
- func (f *File) AddRequiredByFile(file *File)
- func (f *File) AddRequiredFile(file *File)
- func (f *File) AddRequiredRootFile(file *File)
- func (f *File) GobDecode(buf []byte) error
- func (f *File) GobEncode() ([]byte, error)
- func (f *File) UniqueId() string
- type Files
- type FuncKey
- type Function
- func (f *Function) AddCalled(fn *Function)
- func (f *Function) AddCalledBy(fn *Function)
- func (f *Function) AddUse()
- func (f *Function) CountDeps() int64
- func (f *Function) CountDepsBy() int64
- func (f *Function) Deps() *Classes
- func (f *Function) DepsBy() *Classes
- func (f Function) Equal(fi2 Function) bool
- func (f *Function) GobDecode(buf []byte) error
- func (f *Function) GobEncode() ([]byte, error)
- func (f *Function) ID() int64
- func (f *Function) IsEmbeddedFunc() bool
- func (f *Function) IsMethod() bool
- func (f *Function) IsVendorFunction() bool
- type Functions
- func (f *Functions) Add(fn *Function)
- func (f *Functions) CountFunctions(withEmbedded bool) int64
- func (f *Functions) CountMagicNumbers() int64
- func (f *Functions) CountMethods() int64
- func (f *Functions) CyclomaticComplexity() int64
- func (f *Functions) Get(fn FuncKey) (*Function, bool)
- func (f *Functions) GetFullFuncName(name string) ([]FuncKey, error)
- func (f *Functions) GetFunctionByPartOfName(name string) (*Function, error)
- func (f *Functions) Len() int
- func (f *Functions) MaxMinAvgFunctionsCountMagicNumbers() (max, min, avg int64)
- func (f *Functions) MaxMinAvgFunctionsCyclomaticComplexity() (max, min, avg float64)
- func (f *Functions) MaxMinAvgMethodCountMagicNumbers() (max, min, avg int64)
- func (f *Functions) MaxMinAvgMethodCyclomaticComplexity() (max, min, avg float64)
- type Namespace
- type Namespaces
- func (n *Namespaces) Add(ns *Namespace)
- func (n *Namespaces) AddClassToNamespace(nsName string, class *Class)
- func (n *Namespaces) AddFileToNamespace(nsName string, file *File)
- func (n *Namespaces) AddFunctionToNamespace(nsName string, fun *Function)
- func (n *Namespaces) Count() int64
- func (n *Namespaces) CreateNamespace(nsName string) *Namespace
- func (n *Namespaces) Get(name string) (*Namespace, bool)
- func (n *Namespaces) GetNamespace(nsName string) (*Namespace, bool)
- func (n *Namespaces) GetNamespacesWithSpecificLevel(level int64, count, offset int64) []*Namespace
- func (n *Namespaces) Len() int
Constants ¶
This section is empty.
Variables ¶
View Source
var FieldsCount int64
View Source
var FunctionCount int64
Functions ¶
func IsEmbeddedFunc ¶
Types ¶
type Class ¶
type Class struct { Name string File *File Namespace *Namespace Implements *Classes Extends *Classes ImplementsBy *Classes ExtendsBy *Classes IsAbstract bool IsInterface bool IsTrait bool Fields *Fields Methods *Functions Constants *Constants UsedConstants *Constants // Зависим от Deps *Classes // Зависят от нас DepsBy *Classes IsVendor bool // metrics LcomResolved bool Lcom float64 Lcom4Resolved bool Lcom4 int64 }
func NewAbstractClass ¶
func NewInterface ¶
func (*Class) AddExtends ¶
func (*Class) AddImplements ¶
func (*Class) CountFullyTypedMethods ¶ added in v1.0.0
func (*Class) NamespaceName ¶ added in v0.4.0
type Classes ¶
func NewClasses ¶
func NewClasses() *Classes
func (*Classes) CountAbstractClasses ¶ added in v0.2.0
func (*Classes) CountClasses ¶ added in v0.2.0
func (*Classes) CountConcreteClasses ¶ added in v1.0.0
func (*Classes) CountIfaces ¶ added in v0.2.0
func (*Classes) CountTraits ¶ added in v1.0.0
func (*Classes) GetAnyTypeClassByPartOfName ¶ added in v1.0.0
func (*Classes) GetClassByPartOfName ¶ added in v0.3.0
func (*Classes) GetFullClassName ¶
func (*Classes) GetInterfaceByPartOfName ¶ added in v1.0.0
func (*Classes) GetTraitByPartOfName ¶ added in v1.0.0
func (*Classes) MaxMinAvgCountMagicNumbers ¶ added in v0.2.0
func (*Classes) MaxMinAvgCyclomaticComplexity ¶ added in v0.2.0
type Constant ¶
func NewConstant ¶
func NewConstantKey ¶ added in v0.3.0
func (*Constant) IsEmbedded ¶ added in v0.3.0
func (*Constant) IsSuperGlobal ¶ added in v0.3.0
type Constants ¶
func NewConstants ¶
func NewConstants() *Constants
func (*Constants) AddMethodAccess ¶ added in v0.3.0
type FieldKey ¶
func NewFieldKey ¶
type Fields ¶
func (*Fields) AddMethodAccess ¶
type File ¶
type File struct { Name string Path string RequiredRoot *Files RequiredBlock *Files RequiredBy *Files Classes *Classes Funcs *Functions CountLines int64 }
func (*File) AddRequiredByFile ¶
func (*File) AddRequiredFile ¶
func (*File) AddRequiredRootFile ¶
type Files ¶
func (*Files) CountLines ¶ added in v0.2.0
func (*Files) GetFileByPartOfName ¶ added in v0.3.0
type Function ¶
type Function struct { Name FuncKey Pos meta.ElementPosition Namespace *Namespace Called *Functions CalledBy *Functions UsedFields *Fields UsedConstants *Constants UsesCount int64 CyclomaticComplexity int64 CountMagicNumbers int64 FullyTyped bool // Method part Class *Class Id int64 // contains filtered or unexported fields }
func NewFunction ¶
func NewFunction(name FuncKey, pos meta.ElementPosition) *Function
func (*Function) AddCalledBy ¶
func (*Function) CountDepsBy ¶
func (*Function) IsEmbeddedFunc ¶
func (*Function) IsVendorFunction ¶ added in v0.4.0
type Functions ¶
func NewFunctions ¶
func NewFunctions() *Functions
func (*Functions) CountFunctions ¶ added in v0.2.0
func (*Functions) CountMagicNumbers ¶ added in v0.2.0
func (*Functions) CountMethods ¶ added in v0.2.0
func (*Functions) CyclomaticComplexity ¶ added in v0.2.0
func (*Functions) GetFullFuncName ¶
func (*Functions) GetFunctionByPartOfName ¶ added in v0.4.0
func (*Functions) MaxMinAvgFunctionsCountMagicNumbers ¶ added in v0.2.0
func (*Functions) MaxMinAvgFunctionsCyclomaticComplexity ¶ added in v0.2.0
func (*Functions) MaxMinAvgMethodCountMagicNumbers ¶ added in v0.2.0
func (*Functions) MaxMinAvgMethodCyclomaticComplexity ¶ added in v0.2.0
type Namespace ¶
type Namespace struct { Name string FullName string Files *Files Classes *Classes Functions *Functions Childs *Namespaces MetricsResolved bool Aff float64 Eff float64 Instab float64 }
func NewNamespace ¶
func (*Namespace) CountAbstractAndAllClasses ¶ added in v0.4.0
func (*Namespace) CountChildNamespaces ¶ added in v0.2.0
type Namespaces ¶
type Namespaces struct { Namespaces map[string]*Namespace // contains filtered or unexported fields }
func NewNamespaces ¶
func NewNamespaces() *Namespaces
func (*Namespaces) Add ¶
func (n *Namespaces) Add(ns *Namespace)
func (*Namespaces) AddClassToNamespace ¶
func (n *Namespaces) AddClassToNamespace(nsName string, class *Class)
func (*Namespaces) AddFileToNamespace ¶
func (n *Namespaces) AddFileToNamespace(nsName string, file *File)
func (*Namespaces) AddFunctionToNamespace ¶ added in v0.4.0
func (n *Namespaces) AddFunctionToNamespace(nsName string, fun *Function)
func (*Namespaces) Count ¶ added in v0.2.0
func (n *Namespaces) Count() int64
func (*Namespaces) CreateNamespace ¶
func (n *Namespaces) CreateNamespace(nsName string) *Namespace
func (*Namespaces) GetNamespace ¶
func (n *Namespaces) GetNamespace(nsName string) (*Namespace, bool)
func (*Namespaces) GetNamespacesWithSpecificLevel ¶
func (n *Namespaces) GetNamespacesWithSpecificLevel(level int64, count, offset int64) []*Namespace
func (*Namespaces) Len ¶
func (n *Namespaces) Len() int
Click to show internal directories.
Click to hide internal directories.