php-cs-fixer
A tool to automatically fix PHP Coding Standards issues.
Installation
dagger install github.com/sagikazarmark/daggerverse/php-cs-fixer@fb248d287658681298c8997f36575d6768c92c04
Entrypoint
Return Type
PhpCsFixer !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String | "3" | Version (image tag) to use from the official image repository as a base container. |
phpVersion | String | - | Customize PHP version (supported versions: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer?tab=readme-ov-file#supported-php-versions). |
container | Container | - | Custom container to use as a base container. Takes precedence over version and phpVersion. |
Example
dagger -m github.com/sagikazarmark/daggerverse/php-cs-fixer@fb248d287658681298c8997f36575d6768c92c04 call \
func (m *myModule) example() *PhpCsFixer {
return dag.
PhpCsFixer()
}
@function
def example() -> dag.PhpCsFixer:
return (
dag.php_cs_fixer()
)
@func()
example(): PhpCsFixer {
return dag
.phpCsFixer()
}
Types
PhpCsFixer 🔗
container() 🔗
Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/php-cs-fixer@fb248d287658681298c8997f36575d6768c92c04 call \
container
func (m *myModule) example() *Container {
return dag.
PhpCsFixer().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.php_cs_fixer()
.container()
)
@func()
example(): Container {
return dag
.phpCsFixer()
.container()
}
check() 🔗
Check if configured files/directories comply with configured rules.
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/php-cs-fixer@fb248d287658681298c8997f36575d6768c92c04 call \
check --source DIR_PATH
func (m *myModule) example(source *Directory) *Container {
return dag.
PhpCsFixer().
Check(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.php_cs_fixer()
.check(source)
)
@func()
example(source: Directory): Container {
return dag
.phpCsFixer()
.check(source)
}