phpstan
PHP Static Analysis Tool - discover bugs in your code without running it!
Installation
dagger install github.com/sagikazarmark/daggerverse/phpstan@fb248d287658681298c8997f36575d6768c92c04
Entrypoint
Return Type
Phpstan !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | "latest" | Version (image tag) to use from the official image repository as a base container. |
phpVersion | String | - | Customize PHP version (currently supported: any minor version from the 8.x branch). |
container | Container | - | Custom container to use as a base container. Takes precedence over version. |
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@fb248d287658681298c8997f36575d6768c92c04 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@fb248d287658681298c8997f36575d6768c92c04 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
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
paths | [String ! ] | - | Paths with source code to run analysis on. |
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@fb248d287658681298c8997f36575d6768c92c04 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
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
paths | [String ! ] | - | Paths with source code to run analysis on. |
Example
dagger -m github.com/sagikazarmark/daggerverse/phpstan@fb248d287658681298c8997f36575d6768c92c04 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)
}