Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer updates #15

Closed
wants to merge 81 commits into from
Closed

Composer updates #15

wants to merge 81 commits into from

Conversation

pl38
Copy link

@pl38 pl38 commented Apr 15, 2024

No description provided.

DaveChild and others added 30 commits February 3, 2023 16:10
feat(.gitignore): add common directories and files to ignore list

Added patterns to .gitignore to exclude log files, PHP CS Fixer cache,
PHPStorm metadata, build artifacts, node_modules, storage directory,
ray.php, and PHPStan baseline. This prevents unnecessary files from
being tracked in version control, keeping the repository clean.

Ref: composer-updates
```
…composer-updates)

Add a `.php-cs-fixer.php` configuration file to define rules for automatic
code style corrections in the project. This includes PSR-12 compliance and
an assortment of additional rules to ensure a consistent coding standard.```
refactor(tests): update test cases to use Pest PHP

Change test cases to use the Pest PHP testing framework. Refactor existing
test cases in MetricFactoryTest.php, SizeMetricTest.php, and others to use
Pest PHP functions such as test and beforeEach. Remove unnecessary use of
namespaces and class structures for test cases, simplifying the codebase.

Issue: composer-updates
```
style: apply PSR-12 formatting and add trailing commas

Apply PSR-12 formatting standards in AbstractKeywordDensityMetric.php,
ensuring consistency in spacing and adding trailing commas to arrays.
Additionally, cast text to string before applying `strtolower` and
`preg_replace` for clarity.
```
style: align class constants and improve whitespace in AbstractMetric

This commit adjusts the alignment of class constants to enhance
readability. It also introduces additional line breaks to separate logical
blocks of code within methods, adhering to coding standards.

Refs: composer-updates
```
style: add space after negation operator in AbstractParser

Ensure consistency in spacing after the negation operator within the
`__construct` method of the `AbstractParser` class.
```
refactor: standardise whitespace in AltsMetric calculation (composer-updates)

Ensure consistent spacing around variable assignments in the AltsMetric.php.
This improves code readability and maintains coding standards.
```
refactor: streamline Analyzer constructors and methods (composer-updates)

- Remove unused parameters in Analyzer constructors.
- Enforce PSR-12 by adding spaces after negation operators.
- Tidy up formatting and remove unnecessary comments for clarity.
```
pl38 added 29 commits April 15, 2024 17:52
refactor: update type declarations and default handling in AbstractKeywordDensityMetric (#composer-updates)

Update type declarations for class properties and constructor
parameters. Refactor default input data handling to check for empty
array. Simplify calculateKeywordsPercentage and getWords methods.
Remove redundant comments and code cleanup.
```
refactor(tests): move test cases to feature namespace

Moved all test cases from `TestCase` to `Feature` namespace, with
appropriate adjustments to the test infrastructure. This includes
namespace changes, strict type declarations, and renaming of the base
test case class. Also, the example test was amended to be more
expressive.
```
feat: add .phpunit.cache to .gitignore (composer-updates)

Ensure PHPUnit cache is not tracked by adding its directory to the
project's .gitignore file.
```
refactor: type-hint properties and methods in AbstractMetric

Type-hint class properties and methods for better code quality and
maintainability. Remove unused use statement and redundant variable
assignments. Update constructor to use property promotion.
```
refactor(parser): update AbstractParser with typed properties and methods

Replace docblocks with type hints in properties and methods.
Use union types and attributes where applicable.
Ensure compatibility with ParserInterface.
Issue found in branch name: composer-updates.
```
feat(AltsMetric): add typing and override annotation (#composer-updates)

Add strong typing to the $description property and the Override
attribute to the analyze method in the AltsMetric class.
```
refactor: remove redundant docblocks, add type hints in Analyzer (#composer-updates)

- Removed unnecessary docblocks from properties and constructor.
- Added string type hints to getFileContent method parameters.
- Utilised constructor property promotion for $client.
```
feat: add strict types and improve parameter typing for Cache

- Enforce strict typing with `declare(strict_types=1)`.
- Introduce `use DateInterval` to support more precise TTL definitions.
- Refactor `__construct` method to accept `int|null` for `$ttl` and
  default to 300 if not provided.
- Update `set` method signature to accept `mixed` type for `$value` and
  `DateInterval|int|null` for `$ttl`, enhancing flexibility and type safety.
  Related to composer-updates.
```
feat: update Client property and method with type declarations (#composer-updates)

- Add type declaration to `$options` property.
- Replace docblock with #[Override] attribute for `get` method.
```
feat: update PHP and package dependencies (#composer-updates)

Update PHP requirement to >=8.3 and upgrade various package versions.
Introduce new development tools and plugins, reorganise composer.json,
and modify test scripts to use Pest.
```
feat(ExampleCustomParser): add Override attribute to getAlts method

Add the use of Override attribute in ExampleCustomParser to clarify
method overriding. Issue found in the 'composer-updates' branch.
```
feat: add type hint and override attribute to HeadersKeywordDensityMetric

- Include 'use Override' directive.
- Add string type hint to the $description property.
- Annotate the analyze method with #[Override] attribute.
```
refactor: standardise types and annotations in HeadersMetric (#composer-updates)

- Enforce type declarations for class properties and constructor parameter.
- Add Override attribute to analyze and setUpResultsConditions methods.
```
refactor: type hint properties and methods in HeadersMetric (#composer-updates)

- Add type hints to $description and $results properties.
- Specify return type for analyze() and setUpResultsConditions() methods.
- Add Override attribute to analyze() and setUpResultsConditions().
- Ensure type compatibility for $inputData parameter in constructor.
```
feat: add types and override attribute to KeywordDensityMetric (#composer-updates)

Ensure proper typing in KeywordDensityMetric properties and methods.
Also, decorate the analyze method with the Override attribute to
clarify its role in the class hierarchy.
```
feat(KeywordMetric): enforce type declaration and add Override attribute

Use type declaration for `$description` property and add the Override
attribute to `analyze` method in `KeywordMetric`. This change improves
code consistency and readability.

Refs: composer-updates
```
fix: type-hint $description and add Override attribute (#composer-updates)

- Type-hint the `$description` property to `string`.
- Add the `Override` attribute to the `analyze` method.
```
feat: add type declaration and attribute in LoadTimeMetric #composer-updates

- Add string type declaration to $description property.
- Include Override attribute to analyze method.
```
refactor: type-hint properties and methods in MetaMetric (#composer-updates)

- Add type declarations to class properties and method parameters.
- Include `Override` attribute for overriding methods.
```
feat: update MetricFactory to handle SSL metrics #composer-updates

- Update the `get` method signature to allow mixed types.
- Add conditional handling for SSL metrics to use uppercase class names.
```
feat: add override attribute to parser methods (#composer-updates)

Added the #[Override] attribute to methods in the Parser class to
explicitly indicate they override methods of the parent class.
```
feat(ParserInterface): add type hint for `setContent` parameter (#composer-updates)

The `setContent` method in the ParserInterface now accepts a mixed type
parameter, enhancing flexibility and compatibility with various content
types.
```
feat: enforce typing and add attribute in RatioMetric

- Specify string type for $description property.
- Declare parameter type for RatioMetric constructor.
- Add #[Override] attribute to analyze method.
Based on branch name, relates to composer-updates.
```
fix: add types and attributes to RedirectMetric properties (#composer-updates)

Ensure proper typing for class properties and use of the Override
attribute in RedirectMetric for better code clarity and compliance
with PHP 8 standards.
```
feat(RobotsMetric): type-hint $description and add Override annotation

Add type declaration for $description property and Override attribute to
the analyze method in the RobotsMetric class. This improves code
clarity and adherence to best practices. #composer-updates
```
feat: add type hint and attribute in SitemapMetric (#composer-updates)

Add explicit string type hint to $description and Override attribute
to the analyze method in SitemapMetric.
```
feat: upgrade SizeMetric with type declarations (#composer-updates)

Add type declarations for properties and constructor parameter.
Annotate analyze method with #[Override] attribute.
```
feat: add typing and override annotation to SSLMetric (#composer-updates)

Added strict typing to the `$description` property and the override
annotation to the `analyze` method in SSLMetric.php.
```
feat: add phpstan config and rector for code quality (composer-updates)

- Introduced phpstan.neon.dist to configure static analysis.
- Created rector.php for automated code refactor.
- Updated phpunit.xml with stricter testing configurations.
```
@pl38 pl38 closed this Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants