-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from ARCANEDEV/update-laravel_7
Updating the package to support Laravel 7
- Loading branch information
Showing
23 changed files
with
144 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
declare(strict_types=1); | ||
|
||
namespace Arcanedev\SeoHelper\Bases; | ||
namespace Arcanedev\SeoHelper\Entities; | ||
|
||
use Arcanedev\SeoHelper\Contracts\Entities\MetaCollection as MetaCollectionContract; | ||
use Arcanedev\SeoHelper\Contracts\Helpers\Meta as MetaContract; | ||
|
@@ -16,7 +16,7 @@ | |
* @package Arcanedev\SeoHelper\Bases | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
abstract class MetaCollection extends Collection implements MetaCollectionContract | ||
abstract class AbstractMetaCollection extends Collection implements MetaCollectionContract | ||
{ | ||
/* ----------------------------------------------------------------- | ||
| Properties | ||
|
@@ -131,9 +131,9 @@ protected function addMeta($name, $content) | |
*/ | ||
public function remove($names) | ||
{ | ||
return $this->forget( | ||
$this->prepareName($names) | ||
); | ||
$names = static::prepareName($names); | ||
|
||
return $this->forget($names); | ||
} | ||
|
||
/** | ||
|
@@ -194,22 +194,6 @@ protected function isIgnored($name) | |
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* Remove an item from the collection by key. | ||
* | ||
* @param string|array $keys | ||
* | ||
* @return $this | ||
*/ | ||
public function forget($keys) | ||
{ | ||
foreach ((array) $keys as $key) { | ||
$this->offsetUnset($key); | ||
} | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Refresh meta collection items. | ||
* | ||
|
@@ -229,7 +213,7 @@ private function refresh() | |
* | ||
* @return array | ||
*/ | ||
protected function prepareName($names) | ||
protected static function prepareName($names) | ||
{ | ||
return array_map(function ($name) { | ||
return strtolower(trim($name)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,15 @@ | |
|
||
namespace Arcanedev\SeoHelper\Entities; | ||
|
||
use Arcanedev\SeoHelper\Bases\MetaCollection as BaseMetaCollection; | ||
use Arcanedev\SeoHelper\Helpers\Meta; | ||
|
||
/** | ||
* Class MetaCollection | ||
* | ||
* @package Arcanedev\SeoHelper\Bases | ||
* @package Arcanedev\SeoHelper\Entities | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class MetaCollection extends BaseMetaCollection | ||
class MetaCollection extends AbstractMetaCollection | ||
{ | ||
/* ----------------------------------------------------------------- | ||
| Properties | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ | |
|
||
namespace Arcanedev\SeoHelper\Entities\OpenGraph; | ||
|
||
use Arcanedev\SeoHelper\Bases\MetaCollection as BaseMetaCollection; | ||
use Arcanedev\SeoHelper\Entities\AbstractMetaCollection; | ||
|
||
/** | ||
* Class MetaCollection | ||
* | ||
* @package Arcanedev\SeoHelper\Entities\OpenGraph | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class MetaCollection extends BaseMetaCollection | ||
class MetaCollection extends AbstractMetaCollection | ||
{ | ||
/* ----------------------------------------------------------------- | ||
| Properties | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ | |
|
||
namespace Arcanedev\SeoHelper\Entities\Twitter; | ||
|
||
use Arcanedev\SeoHelper\Bases\MetaCollection as BaseMetaCollection; | ||
use Arcanedev\SeoHelper\Entities\AbstractMetaCollection; | ||
|
||
/** | ||
* Class MetaCollection | ||
* | ||
* @package Arcanedev\SeoHelper\Entities\Twitter | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class MetaCollection extends BaseMetaCollection | ||
class MetaCollection extends AbstractMetaCollection | ||
{ | ||
/* ----------------------------------------------------------------- | ||
| Properties | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.