Skip to content

Commit

Permalink
Merge pull request #35 from ARCANEDEV/patch-1
Browse files Browse the repository at this point in the history
Updating the package
  • Loading branch information
arcanedev-maroc authored Feb 11, 2018
2 parents e3acb7f + 14107ae commit 5d2181e
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpunit.xml export-ignore
phpunit.xml.dist export-ignore
CONTRIBUTING.md export-ignore
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 2
runs: 3
php_code_sniffer:
enabled: true
config:
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ php:

matrix:
allow_failures:
- php: 7.2
- php: nightly

before_script:
Expand All @@ -23,5 +22,5 @@ script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- if [ "$TRAVIS_PHP_VERSION" != "7.2" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.2" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"license": "MIT",
"require": {
"php": ">=7.0",
"arcanedev/support": "~4.0"
"arcanedev/support": "~4.2"
},
"require-dev": {
"orchestra/testbench": "~3.5.0",
Expand All @@ -40,10 +40,7 @@
"laravel": {
"providers": [
"Arcanedev\\SeoHelper\\SeoHelperServiceProvider"
],
"aliases": {
"SeoHelper": "Arcanedev\\SeoHelper\\Facades\\SeoHelper"
}
]
}
}
}
10 changes: 10 additions & 0 deletions config/seo-helper.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php

return [

/* -----------------------------------------------------------------
| Title
| -----------------------------------------------------------------
*/

'title' => [
'default' => 'Default Title',
'site-name' => config('app.name', 'My Application'),
Expand All @@ -17,6 +19,7 @@
| Description
| -----------------------------------------------------------------
*/

'description' => [
'default' => 'Default description',
'max' => 155,
Expand All @@ -26,6 +29,7 @@
| Keywords
| -----------------------------------------------------------------
*/

'keywords' => [
'default' => [
//
Expand All @@ -36,6 +40,7 @@
| Miscellaneous
| -----------------------------------------------------------------
*/

'misc' => [
'canonical' => true,
'robots' => config('app.env') !== 'production', // Tell robots not to index the content if it's not on production
Expand All @@ -50,6 +55,7 @@
| Webmaster Tools
| -----------------------------------------------------------------
*/

'webmasters' => [
'google' => '',
'bing' => '',
Expand All @@ -62,6 +68,7 @@
| Open Graph
| -----------------------------------------------------------------
*/

'open-graph' => [
'enabled' => true,
'prefix' => 'og:',
Expand All @@ -79,6 +86,7 @@
| -----------------------------------------------------------------
| Supported card types : 'app', 'gallery', 'photo', 'player', 'product', 'summary', 'summary_large_image'.
*/

'twitter' => [
'enabled' => true,
'prefix' => 'twitter:',
Expand All @@ -94,7 +102,9 @@
| Analytics
| -----------------------------------------------------------------
*/

'analytics' => [
'google' => '', // UA-XXXXXXXX-X
],

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

use Arcanedev\SeoHelper\Contracts\SeoHelper;

if ( ! function_exists('seo_helper')) {
/**
* Get the SeoHelper instance.
*
* @return \Arcanedev\SeoHelper\Contracts\SeoHelper
*/
function seo_helper() {
return app(\Arcanedev\SeoHelper\Contracts\SeoHelper::class);
return app(SeoHelper::class);
}
}
File renamed without changes.
14 changes: 13 additions & 1 deletion src/Bases/MetaCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Arcanedev\SeoHelper\Contracts\Helpers\Meta as MetaContract;
use Arcanedev\SeoHelper\Contracts\Renderable;
use Arcanedev\SeoHelper\Helpers\Meta;
use Arcanedev\Support\Collection;
use Illuminate\Support\Collection;

/**
* Class MetaCollection
Expand Down Expand Up @@ -147,6 +147,18 @@ public function render()
return implode(PHP_EOL, array_filter($output));
}

/**
* Reset the collection.
*
* @return \Arcanedev\SeoHelper\Bases\MetaCollection
*/
public function reset()
{
$this->items = [];

return $this;
}

/**
* Render the tag.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,6 @@ private function checkNameProperty(&$nameProperty)
*/
public function clean($value)
{
return htmlentities(strip_tags($value),ENT_QUOTES, 'UTF-8');
return e(strip_tags($value));
}
}
1 change: 0 additions & 1 deletion tests/Entities/MetaCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function it_can_be_instantiated()
$expectations = [
\Arcanedev\SeoHelper\Entities\MetaCollection::class,
\Arcanedev\SeoHelper\Contracts\Entities\MetaCollection::class,
\Arcanedev\Support\Collection::class,
\Illuminate\Support\Collection::class,
];

Expand Down
12 changes: 0 additions & 12 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@
*/
abstract class TestCase extends BaseTestCase
{
/* -----------------------------------------------------------------
| Properties
| -----------------------------------------------------------------
*/

/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://localhost';

/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
Expand Down

0 comments on commit 5d2181e

Please sign in to comment.