diff --git a/.gitattributes b/.gitattributes index 773a14a..7ccb1f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.scrutinizer.yml b/.scrutinizer.yml index d44a72f..282131b 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -22,7 +22,7 @@ checks: tools: external_code_coverage: timeout: 600 - runs: 2 + runs: 3 php_code_sniffer: enabled: true config: diff --git a/.travis.yml b/.travis.yml index 880e88b..05f8876 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ php: matrix: allow_failures: - - php: 7.2 - php: nightly before_script: @@ -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 diff --git a/composer.json b/composer.json index 4d9ab3c..e1d9281 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -40,10 +40,7 @@ "laravel": { "providers": [ "Arcanedev\\SeoHelper\\SeoHelperServiceProvider" - ], - "aliases": { - "SeoHelper": "Arcanedev\\SeoHelper\\Facades\\SeoHelper" - } + ] } } } diff --git a/config/seo-helper.php b/config/seo-helper.php index 9d5e8d1..7f38c6c 100644 --- a/config/seo-helper.php +++ b/config/seo-helper.php @@ -1,10 +1,12 @@ [ 'default' => 'Default Title', 'site-name' => config('app.name', 'My Application'), @@ -17,6 +19,7 @@ | Description | ----------------------------------------------------------------- */ + 'description' => [ 'default' => 'Default description', 'max' => 155, @@ -26,6 +29,7 @@ | Keywords | ----------------------------------------------------------------- */ + 'keywords' => [ 'default' => [ // @@ -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 @@ -50,6 +55,7 @@ | Webmaster Tools | ----------------------------------------------------------------- */ + 'webmasters' => [ 'google' => '', 'bing' => '', @@ -62,6 +68,7 @@ | Open Graph | ----------------------------------------------------------------- */ + 'open-graph' => [ 'enabled' => true, 'prefix' => 'og:', @@ -79,6 +86,7 @@ | ----------------------------------------------------------------- | Supported card types : 'app', 'gallery', 'photo', 'player', 'product', 'summary', 'summary_large_image'. */ + 'twitter' => [ 'enabled' => true, 'prefix' => 'twitter:', @@ -94,7 +102,9 @@ | Analytics | ----------------------------------------------------------------- */ + 'analytics' => [ 'google' => '', // UA-XXXXXXXX-X ], + ]; diff --git a/helpers.php b/helpers.php index 8ec0f13..edd35be 100644 --- a/helpers.php +++ b/helpers.php @@ -1,5 +1,7 @@ items = []; + + return $this; + } + /** * Render the tag. * diff --git a/src/Helpers/Meta.php b/src/Helpers/Meta.php index 6069716..0dab638 100644 --- a/src/Helpers/Meta.php +++ b/src/Helpers/Meta.php @@ -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)); } } diff --git a/tests/Entities/MetaCollectionTest.php b/tests/Entities/MetaCollectionTest.php index 359df20..bec69f4 100644 --- a/tests/Entities/MetaCollectionTest.php +++ b/tests/Entities/MetaCollectionTest.php @@ -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, ]; diff --git a/tests/TestCase.php b/tests/TestCase.php index cedf42a..bbeec5f 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -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 | -----------------------------------------------------------------