Skip to content

Commit ac253d9

Browse files
committed
Tidy
1 parent 736c99f commit ac253d9

File tree

13 files changed

+74
-72
lines changed

13 files changed

+74
-72
lines changed

.editorconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ insert_final_newline = true
88
indent_style = space
99
indent_size = 4
1010

11-
[*.yaml]
11+
[{*.yaml,*.yml,*.neon,*.json}]
1212
indent_size = 2
13+
14+
[*.md]
15+
max_line_length = 80
16+
17+
[{Dockerfile,Makefile}]
18+
indent_style = tab

.gitattributes

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
* text=auto
2+
3+
.editorconfig export-ignore
14
.gitattributes export-ignore
5+
.github export-ignore
26
.gitignore export-ignore
3-
.travis.yml export-ignore
7+
docker-compose.yml export-ignore
8+
Dockerfile export-ignore
49
Makefile export-ignore
10+
phpcs.xml
11+
phpstan.neon export-ignore
512
phpunit.xml export-ignore
6-
/tests export-ignore
13+
tests/ export-ignore

.github/workflows/code-style.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ on:
55
- pull_request
66

77
jobs:
8-
phpstan:
9-
name: PHPCS
8+
phpcs:
109
runs-on: ubuntu-20.04
1110
steps:
1211
- name: Checkout
1312
uses: actions/checkout@v4
1413
- name: Install PHP
1514
uses: shivammathur/setup-php@v2
1615
with:
16+
coverage: none
1717
php-version: "7.1"
1818
ini-values: memory_limit=-1
19-
tools: composer:v2, phpcs
20-
- name: Run PHPCS
21-
run: phpcs
19+
tools: phpcs, cs2pr
20+
- name: Run PHP Code Sniffer
21+
run: phpcs -q --report=checkstyle | cs2pr

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66

77
jobs:
88
phpstan:
9-
name: PHPStan
109
runs-on: ubuntu-20.04
1110
steps:
1211
- name: Checkout
@@ -28,5 +27,5 @@ jobs:
2827
- name: Install dependencies
2928
run: composer install --no-interaction --no-progress
3029

31-
- name: Run PHPStan
30+
- name: Analyze
3231
run: vendor/bin/phpstan

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
matrix:
1313
php-version:
1414
- "7.1"
15-
- "7.2"
16-
- "7.3"
1715
- "7.4"
1816
- "8.4"
1917
steps:

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ representative at an online or offline event.
6161

6262
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6363
reported to the community leaders responsible for enforcement at
64-
[INSERT CONTACT METHOD].
64+
<olivier.laviale@gmail.com>.
6565
All complaints will be reviewed and investigated promptly and fairly.
6666

6767
All community leaders are obligated to respect the privacy and security of the
@@ -119,16 +119,15 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119119
version 2.0, available at
120120
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
121121

122-
Community Impact Guidelines were inspired by
122+
Community Impact Guidelines were inspired by
123123
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124124

125125
For answers to common questions about this code of conduct, see the FAQ at
126-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
127127
at [https://www.contributor-covenant.org/translations][translations].
128128

129129
[homepage]: https://www.contributor-covenant.org
130130
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
131131
[Mozilla CoC]: https://github.com/mozilla/diversity
132132
[FAQ]: https://www.contributor-covenant.org/faq
133133
[translations]: https://www.contributor-covenant.org/translations
134-

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Contributions are **welcome** and will be fully **credited**.
44

5-
We accept contributions via Pull Requests on [Github](https://github.com/ICanBoogie/Inflector).
5+
We accept contributions via Pull Requests.
66

77
## Pull Requests
88

99
- **Code style** — We're following a [Coding Standard][]. Check the code style with `make lint`.
1010
- **Code health** — We're using [PHPStan][] to analyse the code, with maximum scrutiny. Check the code with `make lint`.
11-
- **Add tests!** — Your contribution won't be accepted if it doesn't have tests.
11+
- **Add tests!** — Your contribution won't be accepted if it does not have tests.
1212
- **Document any change in behaviour** — Make sure the `README.md` and any other relevant documentation are kept
1313
up-to-date.
1414
- **Consider our release cycle** — We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The ICanBoogie/Inflector package is free software.
22
It is released under the terms of the following BSD License.
33

4-
Copyright (c) 2013-2021 by Olivier Laviale
4+
Copyright (c) 2013 by Olivier Laviale
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without modification,

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Inflector
22

3-
[![Release](https://img.shields.io/packagist/v/ICanBoogie/Inflector.svg)](https://packagist.org/packages/icanboogie/inflector)
4-
[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/Inflector/master.svg)](https://scrutinizer-ci.com/g/ICanBoogie/Inflector)
5-
[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/Inflector/master.svg)](https://coveralls.io/r/ICanBoogie/Inflector)
6-
[![Packagist](https://img.shields.io/packagist/dm/icanboogie/inflector.svg?maxAge=2592000)](https://packagist.org/packages/icanboogie/inflector)
3+
[![Release](https://img.shields.io/packagist/v/icanboogie/inflector.svg)](https://packagist.org/packages/icanboogie/inflector)
4+
[![Code Coverage](https://coveralls.io/repos/github/ICanBoogie/Inflector/badge.svg?branch=main)](https://coveralls.io/r/ICanBoogie/Inflector?branch=main)
5+
[![Downloads](https://img.shields.io/packagist/dm/icanboogie/inflector.svg)](https://packagist.org/packages/icanboogie/inflector)
76

87
A multilingual inflector that transforms words from singular to plural, underscore to camel case, and formats strings in
9-
various ways. Inflections are localized, the default english inflections for pluralization, singularization, and
8+
various ways. Inflections are localized, the default English inflections for pluralization, singularization, and
109
uncountable words are kept in [lib/Inflections/en.php](lib/Inflections/en.php).
1110

1211
Inflections are currently available for the following languages:
@@ -22,7 +21,7 @@ Inflections are currently available for the following languages:
2221

2322
#### Installation
2423

25-
```bash
24+
```shell
2625
composer require icanboogie/inflector
2726
```
2827

@@ -189,25 +188,19 @@ titleize("été_aux_âmes_inouïes"); // Été Aux Âmes Inouïes
189188

190189
The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie/Inflector/actions).
191190

192-
[![Tests](https://github.com/ICanBoogie/Inflector/workflows/test/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Atest)
193-
[![Static Analysis](https://github.com/ICanBoogie/Inflector/workflows/static-analysis/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Astatic-analysis)
194-
[![Code Style](https://github.com/ICanBoogie/Inflector/workflows/code-style/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Acode-style)
191+
[![Tests](https://github.com/ICanBoogie/Inflector/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/ICanBoogie/Inflector/actions/workflows/test.yml)
192+
[![Static Analysis](https://github.com/ICanBoogie/Inflector/actions/workflows/static-analysis.yml/badge.svg?branch=main)](https://github.com/ICanBoogie/Inflector/actions/workflows/static-analysis.yml)
193+
[![Code Style](https://github.com/ICanBoogie/Inflector/actions/workflows/code-style.yml/badge.svg?branch=main)](https://github.com/ICanBoogie/Inflector/actions/workflows/code-style.yml)
195194

196195

197196

198197
## Code of Conduct
199198

200-
This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project and its
201-
community, you are expected to uphold this code.
199+
This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in
200+
this project and its community, you're expected to uphold this code.
202201

203202

204203

205204
## Contributing
206205

207-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
208-
209-
210-
211-
## License
212-
213-
**icanboogie/inflector** is released under the [BSD-3-Clause](LICENSE).
206+
See [CONTRIBUTING](CONTRIBUTING.md) for details.

lib/Inflections.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
/**
1919
* A representation of the inflections used by an inflector.
2020
*
21-
* @property-read array $plurals Rules for {@link pluralize()}.
22-
* @property-read array $singulars Rules for {@link singularize()}.
21+
* @property-read array $plurals Rules for {@see pluralize()}.
22+
* @property-read array $singulars Rules for {@see singularize()}.
2323
* @property-read array $uncountables Uncountables.
24-
* @property-read array $humans Rules for {@link humanize()}.
24+
* @property-read array $humans Rules for {@see humanize()}.
2525
* @property-read array $acronyms Acronyms.
2626
* @property-read string $acronym_regex Acronyms regex.
2727
*/
@@ -57,14 +57,14 @@ public static function get(string $locale = INFLECTOR_DEFAULT_LOCALE): Inflectio
5757
}
5858

5959
/**
60-
* Rules for {@link pluralize()}.
60+
* Rules for {@see pluralize()}.
6161
*
6262
* @var array<string, string> Where _key_ is a rule and _value_ a replacement.
6363
*/
6464
protected $plurals = [];
6565

6666
/**
67-
* Rules for {@link singularize()}.
67+
* Rules for {@see singularize()}.
6868
*
6969
* @var array<string, string> Where _key_ is a rule and _value_ a replacement.
7070
*/
@@ -78,7 +78,7 @@ public static function get(string $locale = INFLECTOR_DEFAULT_LOCALE): Inflectio
7878
protected $uncountables = [];
7979

8080
/**
81-
* Rules for {@link humanize()}.
81+
* Rules for {@see humanize()}.
8282
*
8383
* @var array<string, string> Where _key_ is a rule and _value_ a replacement.
8484
*/
@@ -99,15 +99,15 @@ public static function get(string $locale = INFLECTOR_DEFAULT_LOCALE): Inflectio
9999
protected $acronym_regex = '/(?=a)b/';
100100

101101
/**
102-
* Returns the {@link $acronyms}, {@link $acronym_regex}, {@link $plurals}, {@link $singulars},
103-
* {@link $uncountables} and {@link $humans} properties.
102+
* Returns the {@see $acronyms}, {@see $acronym_regex}, {@see $plurals}, {@see $singulars},
103+
* {@see $uncountables} and {@see $humans} properties.
104104
*
105105
* @param string $property
106106
*
107107
* @return mixed
108108
*
109-
* @throws PropertyNotDefined in attempt to read an inaccessible property. If the {@link PropertyNotDefined}
110-
* class is not available a {@link \InvalidArgumentException} is thrown instead.
109+
* @throws PropertyNotDefined in an attempt to read an inaccessible property. If the {@see PropertyNotDefined}
110+
* class is not available a {@see \InvalidArgumentException} is thrown instead.
111111
*/
112112
public function __get(string $property)
113113
{
@@ -127,10 +127,10 @@ public function __get(string $property)
127127
/**
128128
* Specifies a new acronym. An acronym must be specified as it will appear
129129
* in a camelized string. An underscore string that contains the acronym
130-
* will retain the acronym when passed to {@link camelize}, {@link humanize}, or
131-
* {@link titleize}. A camelized string that contains the acronym will maintain
130+
* will retain the acronym when passed to {@see camelize}, {@see humanize}, or
131+
* {@see titleize}. A camelized string that contains the acronym will maintain
132132
* the acronym when titleized or humanized, and will convert the acronym
133-
* into a non-delimited single lowercase word when passed to {@link underscore}.
133+
* into a non-delimited single lowercase word when passed to {@see underscore}.
134134
*
135135
* <pre>
136136
* $this->acronym('HTML');
@@ -153,7 +153,7 @@ public function __get(string $property)
153153
* $this->underscore('HTTPS'); // 'https'
154154
* </pre>
155155
*
156-
* Note: Acronyms that are passed to {@link pluralize} will no longer be
156+
* Note: Acronyms that are passed to {@see pluralize} will no longer be
157157
* recognized, since the acronym will not occur as a delimited unit in the
158158
* pluralized result. To work around this, you must specify the pluralized
159159
* form as an acronym as well:
@@ -166,7 +166,7 @@ public function __get(string $property)
166166
* $this->camelize($this->pluralize('api')); // 'APIs'
167167
* </pre>
168168
*
169-
* {@link acronym} may be used to specify any word that contains an acronym or
169+
* {@see acronym} may be used to specify any word that contains an acronym or
170170
* otherwise needs to maintain a non-standard capitalization. The only
171171
* restriction is that the word must begin with a capital letter.
172172
*

0 commit comments

Comments
 (0)