Skip to content

Commit

Permalink
Updating the package
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Mar 20, 2024
1 parent c84bf1e commit 4c01f5f
Show file tree
Hide file tree
Showing 66 changed files with 1,571 additions and 2,416 deletions.
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
phpunit.xml.dist export-ignore
CONTRIBUTING.md export-ignore
phpunit.xml.dist export-ignore
pint.json export-ignore
23 changes: 23 additions & 0 deletions .github/workflows/cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check & Fix styling

on: [push]

jobs:
cs-fixer:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: "laravel-pint"
uses: aglipanci/laravel-pint-action@latest
with:
verboseMode: true

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix the code styling
18 changes: 4 additions & 14 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -30,19 +28,11 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: pcov

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction

- name: Execute tests
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- name: Scrutinizer CI
run: |
composer require scrutinizer/ocular --dev -W
vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
run: composer test:ci
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/build/
/vendor/
/.idea
/.phpunit.cache
/build
/vendor
/composer.lock
/composer.phar
.phpunit.result.cache
35 changes: 0 additions & 35 deletions .scrutinizer.yml

This file was deleted.

7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# SEO Helper [![Packagist License][badge_license]](LICENSE.md) [![For PHP][badge_php]][link-github-repo]

[![Github Workflow Status][badge_build]][link-github-status]
[![Coverage Status][badge_coverage]][link-scrutinizer]
[![Scrutinizer Code Quality][badge_quality]][link-scrutinizer]
[![SensioLabs Insight][badge_insight]][link-insight]
[![Github Issues][badge_issues]][link-github-issues]

Expand All @@ -18,7 +16,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/SEO-Helper/re

### Features

* Framework agnostic package.
* Framework-agnostic package.
* Open Graph & Twitter Cards are supported.
* Webmaster tools site verifier tags are supported.
* Google Analytics tracking code is supported.
Expand Down Expand Up @@ -52,8 +50,6 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
[badge_php]: https://img.shields.io/badge/PHP-Framework%20agnostic-4F5B93.svg?style=flat-square
[badge_license]: https://img.shields.io/packagist/l/arcanedev/seo-helper.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/SEO-Helper/run-tests?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/SEO-Helper.svg?style=flat-square
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/SEO-Helper.svg?style=flat-square
[badge_insight]: https://img.shields.io/sensiolabs/i/73e1a779-7ca7-4a75-b6d3-452d7852187e.svg?style=flat-square
[badge_issues]: https://img.shields.io/github/issues/ARCANEDEV/SEO-Helper.svg?style=flat-square
[badge_package]: https://img.shields.io/badge/package-arcanedev/seo--helper-blue.svg?style=flat-square
Expand All @@ -66,5 +62,4 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
[link-github-issues]: https://github.com/ARCANEDEV/SEO-Helper/issues
[link-contributors]: https://github.com/ARCANEDEV/SEO-Helper/graphs/contributors
[link-packagist]: https://packagist.org/packages/arcanedev/seo-helper
[link-scrutinizer]: https://scrutinizer-ci.com/g/ARCANEDEV/SEO-Helper/?branch=master
[link-insight]: https://insight.sensiolabs.com/projects/73e1a779-7ca7-4a75-b6d3-452d7852187e
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"require-dev": {
"ext-dom": "*",
"laravel/framework": "^9.0",
"laravel/pint": "^1.14",
"orchestra/testbench-core": "^7.0",
"phpunit/phpunit": "^9.5.10"
},
Expand All @@ -39,8 +40,11 @@
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
"test": "phpunit --colors=always",
"test:dox": "phpunit --testdox --colors=always",
"test:ci": "phpunit --coverage-text",
"cs:fix": "pint -v",
"cs:test": "pint --test -v"
},
"extra": {
"branch-alias": {
Expand Down
8 changes: 5 additions & 3 deletions config/seo-helper.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [

/* -----------------------------------------------------------------
Expand Down Expand Up @@ -32,7 +34,7 @@

'keywords' => [
'default' => [
//

],
],

Expand Down Expand Up @@ -77,7 +79,7 @@
'description' => 'Default Open Graph description',
'site-name' => '',
'properties' => [
//

],
],

Expand All @@ -94,7 +96,7 @@
'site' => 'Username',
'title' => 'Default Twitter Card title',
'metas' => [
//

],
],

Expand Down
4 changes: 3 additions & 1 deletion helpers.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php

declare(strict_types=1);

use Arcanedev\SeoHelper\Contracts\SeoHelper;

if ( ! function_exists('seo_helper')) {
/**
* Get the SeoHelper instance.
*
* @return \Arcanedev\SeoHelper\Contracts\SeoHelper
* @return SeoHelper
*/
function seo_helper(): SeoHelper
{
Expand Down
85 changes: 85 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"preset": "per",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
"concat_space": {
"spacing": "one"
},
"declare_parentheses": true,
"declare_strict_types": true,
"explicit_string_variable": true,
"fully_qualified_strict_types": true,
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"is_null": true,
"lambda_not_used_import": true,
"logical_operators": true,
"mb_str_functions": true,
"method_chaining_indentation": true,
"modernize_strpos": true,
"new_with_braces": true,
"no_empty_comment": true,
"not_operator_with_space": true,
"ordered_traits": true,
"protected_to_private": true,
"simplified_if_return": true,
"strict_comparison": true,
"ternary_to_null_coalescing": true,
"trim_array_spaces": true,
"use_arrow_functions": true,
"void_return": true,
"yoda_style": {
"always_move_variable": true,
"equal": false,
"identical": false,
"less_and_greater": false
},
"array_push": true,
"assign_null_coalescing_to_coalesce_equal": true,
"explicit_indirect_variable": true,
"method_argument_space": {
"on_multiline": "ensure_fully_multiline"
},
"modernize_types_casting": true,
"no_superfluous_elseif": true,
"no_useless_else": true,
"nullable_type_declaration_for_default_null_value": true,
"ordered_imports": {
"sort_algorithm": "alpha"
},
"ordered_class_elements": {
"order": [
"use_trait",
"case",
"constant",
"constant_public",
"constant_protected",
"constant_private",
"property_public",
"property_protected",
"property_private",
"construct",
"destruct",
"magic",
"phpunit",
"method_abstract",
"method_public_static",
"method_public",
"method_protected_static",
"method_protected",
"method_private_static",
"method_private"
],
"sort_algorithm": "none"
}
}
}
6 changes: 3 additions & 3 deletions src/Contracts/Entities/Analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ interface Analytics extends Renderable
/**
* Set Google Analytics code.
*
* @param string $code
* @param string $code
*
* @return self
* @return $this
*/
public function setGoogle($code);
public function setGoogle(string $code): static;
}
Loading

0 comments on commit 4c01f5f

Please sign in to comment.