Dagger
Search

phpstan

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

Installation

dagger install github.com/sagikazarmark/daggerverse/phpstan@32b01ce09db8bfc7ef06dec92ea20d42855cbf81

Entrypoint

Return Type
Phpstan !
Arguments
NameTypeDefault ValueDescription
versionString "latest"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@32b01ce09db8bfc7ef06dec92ea20d42855cbf81 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@32b01ce09db8bfc7ef06dec92ea20d42855cbf81 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@32b01ce09db8bfc7ef06dec92ea20d42855cbf81 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@32b01ce09db8bfc7ef06dec92ea20d42855cbf81 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)
}