Skip to content

Commit

Permalink
Merge pull request #4 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Adding Laravel 5.2 Support
  • Loading branch information
arcanedev-maroc committed Jan 1, 2016
2 parents e1987de + aa7cd05 commit bf6604c
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 16 deletions.
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: 3
runs: 12
php_code_sniffer:
enabled: true
config:
Expand Down
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
language: php

sudo: false

php:
- 5.5.9
- 5.5
- 5.6
- 7.0
- hhvm

sudo: false
env:
- TESTBENCH_VERSION=3.0.*
- TESTBENCH_VERSION=3.1.*
- TESTBENCH_VERSION=3.2.*

before_script:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction
- travis_retry composer require --prefer-source --no-interaction --dev "orchestra/testbench:${TESTBENCH_VERSION}"

script:
- composer validate
- mkdir -p build/logs
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ] && [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 ARCANEDEV <arcanedev.maroc@gmail.com> - SEO Helper
Copyright (c) 2015-2016 | ARCANEDEV <arcanedev.maroc@gmail.com> - SEO Helper

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ SEO Helper is a package that provides tools and helpers for SEO (Search Engine O
- [x] Twitter Cards supported.
- [x] Webmaster tools supported.
- [x] Google Analytics supported.
- [x] Laravel 5.2 supported.
- [x] Laravel 5.1 supported.
- [x] Laravel 5.0 supported.

## Contribution

Expand Down
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
{
"name": "ARCANEDEV",
"email": "arcanedev.maroc@gmail.com",
"homepage": "https://github.com/ARCANEDEV",
"homepage": "https://github.com/arcanedev-maroc",
"role": "Developer"
}
],
"type": "library",
"license": "MIT",
"require": {
"php": ">=5.5.9",
"arcanedev/support": "~3.0"
"php": ">=5.5.9",
"arcanedev/support": "~3.0"
},
"require-dev": {
"orchestra/testbench": "~3.1",
"phpunit/phpcov": "~2.0",
"phpunit/phpunit": "~4.0|~5.0"
"phpunit/phpcov": "~2.0",
"phpunit/phpunit": "~4.0|~5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -36,6 +35,9 @@
"Arcanedev\\SeoHelper\\Tests\\": "tests/"
}
},
"scripts": {
"testbench": "composer require --dev \"orchestra/testbench=~3.0\""
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
Expand Down
22 changes: 18 additions & 4 deletions src/Bases/MetaCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected function addMeta($name, $content)
}

/**
* Remove a meta from the meta collection by key.
* Remove a meta from the collection by key.
*
* @param array|string $names
*
Expand All @@ -130,9 +130,7 @@ public function remove($names)
{
$names = $this->prepareName($names);

$this->forget($names);

return $this;
return $this->forget($names);
}

/**
Expand Down Expand Up @@ -179,6 +177,22 @@ protected function isIgnored($name)
| Other Functions
| ------------------------------------------------------------------------------------------------
*/
/**
* Remove an item from the collection by key.
*
* @param string|array $keys
*
* @return self
*/
public function forget($keys)
{
foreach ((array) $keys as $key) {
$this->offsetUnset($key);
}

return $this;
}

/**
* Refresh meta collection items.
*/
Expand Down
11 changes: 11 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
*/
abstract class TestCase extends BaseTestCase
{
/* ------------------------------------------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
*/
/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://localhost';

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit bf6604c

Please sign in to comment.