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 Feb 2, 2020
1 parent 5a29e17 commit 0788e2b
Show file tree
Hide file tree
Showing 60 changed files with 746 additions and 544 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpunit.xml.dist export-ignore
CONTRIBUTING.md export-ignore
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

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

[![Travis Status][badge_build]][link-travis]
[![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]
Expand Down Expand Up @@ -51,7 +51,7 @@ 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/travis/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
Expand All @@ -62,6 +62,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.

[link-author]: https://github.com/arcanedev-maroc
[link-github-repo]: https://github.com/ARCANEDEV/SEO-Helper
[link-github-status]: https://github.com/ARCANEDEV/SEO-Helper/actions
[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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require": {
"php": ">=7.2.0",
"arcanedev/php-html": "^3.0",
"arcanedev/support": "^5.0"
"arcanedev/support": "^5.1"
},
"require-dev": {
"ext-dom": "*",
Expand Down
24 changes: 14 additions & 10 deletions src/Bases/MetaCollection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php namespace Arcanedev\SeoHelper\Bases;
<?php

declare(strict_types=1);

namespace Arcanedev\SeoHelper\Bases;

use Arcanedev\SeoHelper\Contracts\Entities\MetaCollection as MetaCollectionContract;
use Arcanedev\SeoHelper\Contracts\Helpers\Meta as MetaContract;
Expand Down Expand Up @@ -57,7 +61,7 @@ abstract class MetaCollection extends Collection implements MetaCollectionContra
*
* @param string $prefix
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
public function setPrefix($prefix)
{
Expand All @@ -67,7 +71,7 @@ public function setPrefix($prefix)
}

/* -----------------------------------------------------------------
| Main Functions
| Main Methods
| -----------------------------------------------------------------
*/

Expand All @@ -76,7 +80,7 @@ public function setPrefix($prefix)
*
* @param array $metas
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
public function addMany(array $metas)
{
Expand All @@ -93,7 +97,7 @@ public function addMany(array $metas)
* @param string $name
* @param string|array $content
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
public function addOne($name, $content)
{
Expand All @@ -109,7 +113,7 @@ public function addOne($name, $content)
* @param string $name
* @param string|array $content
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
protected function addMeta($name, $content)
{
Expand All @@ -123,7 +127,7 @@ protected function addMeta($name, $content)
*
* @param array|string $names
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
public function remove($names)
{
Expand All @@ -149,7 +153,7 @@ public function render()
/**
* Reset the collection.
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
public function reset()
{
Expand Down Expand Up @@ -195,7 +199,7 @@ protected function isIgnored($name)
*
* @param string|array $keys
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
public function forget($keys)
{
Expand All @@ -209,7 +213,7 @@ public function forget($keys)
/**
* Refresh meta collection items.
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
* @return $this
*/
private function refresh()
{
Expand Down
7 changes: 6 additions & 1 deletion src/Contracts/Entities/Analytics.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php namespace Arcanedev\SeoHelper\Contracts\Entities;
<?php

declare(strict_types=1);

namespace Arcanedev\SeoHelper\Contracts\Entities;

use Arcanedev\SeoHelper\Contracts\Renderable;

Expand All @@ -14,6 +18,7 @@ interface Analytics extends Renderable
| Getters & Setters
| -----------------------------------------------------------------
*/

/**
* Set Google Analytics code.
*
Expand Down
14 changes: 10 additions & 4 deletions src/Contracts/Entities/Description.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php namespace Arcanedev\SeoHelper\Contracts\Entities;
<?php

declare(strict_types=1);

namespace Arcanedev\SeoHelper\Contracts\Entities;

use Arcanedev\SeoHelper\Contracts\Renderable;

Expand All @@ -14,6 +18,7 @@ interface Description extends Renderable
| Getters & Setters
| -----------------------------------------------------------------
*/

/**
* Get raw description content.
*
Expand All @@ -33,7 +38,7 @@ public function get();
*
* @param string $content
*
* @return self
* @return $this
*/
public function set($content);

Expand All @@ -49,21 +54,22 @@ public function getMax();
*
* @param int $max
*
* @return self
* @return $this
*/
public function setMax($max);

/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Make a description instance.
*
* @param string $content
* @param int $max
*
* @return self
* @return $this
*/
public static function make($content, $max = 155);
}
18 changes: 12 additions & 6 deletions src/Contracts/Entities/Keywords.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php namespace Arcanedev\SeoHelper\Contracts\Entities;
<?php

declare(strict_types=1);

namespace Arcanedev\SeoHelper\Contracts\Entities;

use Arcanedev\SeoHelper\Contracts\Renderable;

Expand All @@ -14,6 +18,7 @@ interface Keywords extends Renderable
| Getters & Setters
| -----------------------------------------------------------------
*/

/**
* Get content.
*
Expand All @@ -26,20 +31,21 @@ public function getContent();
*
* @param array|string $content
*
* @return self
* @return $this
*/
public function set($content);

/* -----------------------------------------------------------------
| Main Functions
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Make Keywords instance.
*
* @param array|string $keywords
*
* @return self
* @return $this
*/
public static function make($keywords);

Expand All @@ -48,7 +54,7 @@ public static function make($keywords);
*
* @param string $keyword
*
* @return self
* @return $this
*/
public function add($keyword);

Expand All @@ -57,7 +63,7 @@ public function add($keyword);
*
* @param array $keywords
*
* @return self
* @return $this
*/
public function addMany(array $keywords);
}
15 changes: 10 additions & 5 deletions src/Contracts/Entities/MetaCollection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php namespace Arcanedev\SeoHelper\Contracts\Entities;
<?php

declare(strict_types=1);

namespace Arcanedev\SeoHelper\Contracts\Entities;

use Arcanedev\SeoHelper\Contracts\Renderable;

Expand All @@ -11,16 +15,17 @@
interface MetaCollection extends Renderable
{
/* -----------------------------------------------------------------
| Main Functions
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Add a meta to collection.
*
* @param string $name
* @param string|array $content
*
* @return self
* @return $this
*/
public function addOne($name, $content);

Expand All @@ -29,7 +34,7 @@ public function addOne($name, $content);
*
* @param array $metas
*
* @return self
* @return $this
*/
public function addMany(array $metas);

Expand All @@ -38,7 +43,7 @@ public function addMany(array $metas);
*
* @param array|string $names
*
* @return self
* @return $this
*/
public function remove($names);
}
18 changes: 11 additions & 7 deletions src/Contracts/Entities/MiscTags.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php namespace Arcanedev\SeoHelper\Contracts\Entities;
<?php

declare(strict_types=1);

namespace Arcanedev\SeoHelper\Contracts\Entities;

use Arcanedev\SeoHelper\Contracts\Renderable;

Expand Down Expand Up @@ -27,7 +31,7 @@ public function getUrl();
*
* @param string $url
*
* @return self
* @return $this
*/
public function setUrl($url);

Expand All @@ -48,7 +52,7 @@ public function all();
*
* @param array $defaults
*
* @return self
* @return $this
*/
public static function make(array $defaults = []);

Expand All @@ -58,7 +62,7 @@ public static function make(array $defaults = []);
* @param string $name
* @param string $content
*
* @return self
* @return $this
*/
public function add($name, $content);

Expand All @@ -67,7 +71,7 @@ public function add($name, $content);
*
* @param array $metas
*
* @return self
* @return $this
*/
public function addMany(array $metas);

Expand All @@ -76,14 +80,14 @@ public function addMany(array $metas);
*
* @param array|string $names
*
* @return self
* @return $this
*/
public function remove($names);

/**
* Reset the meta collection.
*
* @return self
* @return $this
*/
public function reset();
}
Loading

0 comments on commit 0788e2b

Please sign in to comment.