Dagger
Search

phpstan

PHP Static Analysis Tool - discover bugs in your code without running it!

Installation

dagger install github.com/sagikazarmark/daggerverse/phpstan@v0.3.0

Entrypoint

Return Type
Phpstan !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a base container.
phpVersionString Customize PHP version (currently supported: any minor version from the 8.x branch).
containerContainer Custom container to use as a base container. Takes precedence over version.
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@84e479601ced57c999880867f0beb56e2afd683d call \
func (m *myModule) example() *Phpstan  {
	return dag.
			Phpstan()
}
@function
def example() -> dag.Phpstan:
	return (
		dag.phpstan()
	)
@func()
example(): Phpstan {
	return dag
		.phpstan()
}

Types

Phpstan 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@84e479601ced57c999880867f0beb56e2afd683d call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Phpstan().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.phpstan()
		.container()
	)
@func()
example(): Container {
	return dag
		.phpstan()
		.container()
}

analyse() 🔗

Analyse source code.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
paths[String ! ] -Paths with source code to run analysis on.
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@84e479601ced57c999880867f0beb56e2afd683d call \
 analyse --source DIR_PATH
func (m *myModule) example(source *Directory) *Container  {
	return dag.
			Phpstan().
			Analyse(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.phpstan()
		.analyse(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.phpstan()
		.analyse(source)
}

generateBaseline() 🔗

Generate baseline file.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
paths[String ! ] -Paths with source code to run analysis on.
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@84e479601ced57c999880867f0beb56e2afd683d call \
 generate-baseline --source DIR_PATH
func (m *myModule) example(source *Directory) *File  {
	return dag.
			Phpstan().
			GenerateBaseline(source)
}
@function
def example(source: dagger.Directory) -> dagger.File:
	return (
		dag.phpstan()
		.generate_baseline(source)
	)
@func()
example(source: Directory): File {
	return dag
		.phpstan()
		.generateBaseline(source)
}