Skip to content

Commit b538306

Browse files
committed
Literal octal notation
1 parent 767404b commit b538306

File tree

6 files changed

+46
-17
lines changed

6 files changed

+46
-17
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ jobs:
4040
run: composer run-script test
4141

4242
- name: Run PHP CS fixer
43-
run: composer run-script php-cs-fixer
43+
run: composer run-script cs-check
4444

4545
- name: Run phpstan
4646
run: composer run-script phpstan
4747

4848
- name: Run ergebnis/composer-normalize
4949
run: composer normalize --dry-run --no-check-lock
50-

.php-cs-fixer.dist.php

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,41 @@
1717
$config
1818
->setRiskyAllowed(true)
1919
->setRules([
20+
'header_comment' => [
21+
'header' => $header,
22+
'comment_type' => 'PHPDoc',
23+
'location' => 'after_open',
24+
'separate' => 'bottom'
25+
],
2026
'@PHP74Migration' => true,
2127
'@PHP74Migration:risky' => true,
22-
'@PHPUnit75Migration:risky' => true,
2328
'@Symfony' => true,
2429
'@Symfony:risky' => true,
2530
'concat_space' => [
2631
'spacing' => 'one',
2732
],
2833
'array_indentation' => true,
29-
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']],
30-
'header_comment' => ['header' => $header, 'comment_type' => 'PHPDoc', 'location' => 'after_open', 'separate' => 'bottom'],
34+
'general_phpdoc_annotation_remove' => [
35+
'annotations' => [
36+
'expectedDeprecation'
37+
]
38+
],
3139
'use_arrow_functions' => true,
40+
'control_structure_braces' => true,
41+
'control_structure_continuation_position' => true,
42+
'self_static_accessor' => true,
43+
'ordered_interfaces' => true,
44+
'phpdoc_var_annotation_correct_order' => true,
45+
'return_assignment' => true,
46+
'no_useless_else' => true,
47+
'no_superfluous_elseif' => true,
48+
'no_useless_return' => true,
49+
'multiline_comment_opening_closing' => true,
50+
'no_null_property_initialization' => true,
51+
'operator_linebreak' => true,
52+
'method_chaining_indentation' => true,
53+
'strict_param' => true,
54+
'strict_comparison' => true,
3255
])
3356
->setFinder($finder)
3457
->setLineEnding(PHP_EOL);

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM composer:latest AS composer
22
FROM php:8.1-fpm
33
COPY --from=composer /usr/bin/composer /usr/bin/composer
4-
LABEL org.opencontainers.image.description="php-chmod is a PHP library for easily changing permissions recursively."
4+
LABEL org.opencontainers.image.description="php-chmod is a PHP library for easily changing file/directory permissions recursively."
55
WORKDIR /app
66
COPY . .
77
RUN apt-get update && apt-get -y upgrade && apt-get -y install zip

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
[![Issues](https://img.shields.io/github/issues/MathiasReker/php-chmod.svg)](https://github.com/MathiasReker/php-chmod/issues)
1010
[![MIT License](https://img.shields.io/github/license/MathiasReker/php-chmod.svg)](https://github.com/MathiasReker/php-chmod/blob/develop/LICENSE.txt)
1111

12-
`php-chmod` is a PHP library for easily changing the permissions recursively.
12+
`php-chmod` is a PHP library for easily changing file/directory permissions recursively.
13+
14+
✅ Literal octal notation (0o) is supported
1315

1416
### Versions & Dependencies
1517

1618
| Version | PHP | Documentation |
1719
|---------|------|---------------|
18-
| ^2.0 | ^7.4 | current |
20+
| ^2.1 | ^7.4 | current |
1921

2022
### Requirements
2123

@@ -168,7 +170,7 @@ with the tag "enhancement". Finally, don't forget to give the project a star! Th
168170
If you are using docker, you can use the following command to get started:
169171

170172
```bash
171-
docker-compose up --build -d
173+
docker-compose up -d
172174
```
173175

174176
Next, access the container:
@@ -182,12 +184,18 @@ docker exec -it php-chmod bash
182184
PHP Coding Standards Fixer:
183185

184186
```bash
185-
composer run-script php-cs-fixer
187+
composer run-script cs-fix
186188
```
187189

188-
PHP Stan:
190+
PHP Coding Standards Checker:
189191

192+
```bash
193+
composer run-script cs-check
190194
```
195+
196+
PHP Stan:
197+
198+
```bash
191199
composer run-script phpstan
192200
```
193201

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mathiasreker/php-chmod",
3-
"description": "php-chmod is a PHP library for easily changing permissions recursively.",
3+
"description": "php-chmod is a PHP library for easily changing file/directory permissions recursively.",
44
"license": "MIT",
55
"type": "library",
66
"keywords": [
@@ -45,8 +45,9 @@
4545
"sort-packages": true
4646
},
4747
"scripts": {
48-
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix .",
49-
"phpstan": "./vendor/bin/phpstan analyse src --level=9",
48+
"cs-check": "./vendor/bin/php-cs-fixer fix . --dry-run --diff",
49+
"cs-fix": "./vendor/bin/php-cs-fixer fix .",
50+
"phpstan": "./vendor/bin/phpstan analyse src/ --level=9",
5051
"test": "./vendor/bin/phpunit --bootstrap vendor/autoload.php --colors=always tests/"
5152
}
5253
}

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ version: "3"
33
services:
44
app:
55
build: .
6-
image: php-chmod:2.0
6+
image: php-chmod:2.1
77
container_name: "php-chmod"
8-
ports:
9-
- "8080:80"
108
volumes:
119
- ./:/app

0 commit comments

Comments
 (0)