Skip to content

Commit

Permalink
feat: remove unnecessary #[Override] attributes across various metr…
Browse files Browse the repository at this point in the history
…ics and parsers.

This change cleans up the code by removing the superfluous `#[Override]` attributes
from methods across multiple files including `LengthMetric.php`, `SizeMetric.php`, `MetaMetric.php`, `KeywordDensityMetric.php`, `HeadersKeywordDensityMetric.php`, `LoadTimeMetric.php`, `AltsMetric.php`, `KeywordMetric.php`, `SSLMetric.php`, `AbstractParser.php`, `ExampleCustomParser.php`, `HeadersMetric.php`, `Client.php`, `RatioMetric.php`, `RobotsMetric.php`, `SitemapMetric.php`, `HeadersMetric.php` in the `Keyword` directory, `RedirectMetric.php`, and the main `Parser.php`. This refinement aids in maintaining cleaner and more readable code.
  • Loading branch information
pl38 committed Apr 16, 2024
1 parent 2c5496f commit dd2c72d
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 1,070 deletions.
806 changes: 0 additions & 806 deletions clover.xml

This file was deleted.

238 changes: 0 additions & 238 deletions coverage.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/HttpClient/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Client implements ClientInterface
],
];

#[Override]

public function get(string $url, array $options = []): ResponseInterface
{
if (empty($options)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/File/RobotsMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RobotsMetric extends AbstractMetric
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if (empty($this->value)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/File/SitemapMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SitemapMetric extends AbstractMetric
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if (empty($this->value)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/AltsMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AltsMetric extends AbstractMetric
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if (empty($this->value)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/Content/RatioMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(mixed $inputData)
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if ($this->value < 10) {
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/Content/SizeMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(mixed $inputData)
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
return $this->checkTheResults('The size of your page is ok');
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/HeadersKeywordDensityMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HeadersKeywordDensityMetric extends AbstractKeywordDensityMetric
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if (! empty($overusedWords = $this->getHeadersOverusedWords())) {
Expand Down
4 changes: 2 additions & 2 deletions src/Metric/Page/HeadersMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(mixed $inputData)
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
return $this->checkTheResults('The headers structure on the site looks very good');
Expand All @@ -63,7 +63,7 @@ public function analyze(): string
/**
* @inheritDoc
*/
#[Override]

protected function setUpResultsConditions(array $conditions = []): bool
{
$conditions = [
Expand Down
4 changes: 2 additions & 2 deletions src/Metric/Page/Keyword/HeadersMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(mixed $inputData)
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
return $this->checkTheResults('Good! The site headers contain the keyword phrase');
Expand All @@ -39,7 +39,7 @@ public function analyze(): string
/**
* @inheritDoc
*/
#[Override]

protected function setUpResultsConditions(array $conditions = []): bool
{
$conditions = [
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/KeywordDensityMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class KeywordDensityMetric extends AbstractKeywordDensityMetric implements Keywo
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
$keywords = $this->analyseKeywords($this->value['text'], $this->value['stop_words']);
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/KeywordMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class KeywordMetric extends AbstractMetric implements KeywordBasedMetricInterfac
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
$this->name = 'Keyword' . $this->value['type'];
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/LoadTimeMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LoadTimeMetric extends AbstractMetric
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if ($this->value === false) {
Expand Down
4 changes: 2 additions & 2 deletions src/Metric/Page/MetaMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(mixed $inputData)
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
return $this->checkTheResults('The site meta tags look good');
Expand All @@ -50,7 +50,7 @@ public function analyze(): string
/**
* @inheritDoc
*/
#[Override]

protected function setUpResultsConditions(array $conditions = []): bool
{
$conditions = ['no_tags' => empty($this->value)];
Expand Down
2 changes: 1 addition & 1 deletion src/Metric/Page/RedirectMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RedirectMetric extends AbstractMetric
/**
* @inheritdoc
*/
#[Override]

public function analyze(): string
{
if (! empty($this->value)) {
Expand Down

0 comments on commit dd2c72d

Please sign in to comment.