Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
Laravel 6 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
tzsk committed Sep 30, 2019
1 parent 0aa78cb commit a32eddc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status](https://scrutinizer-ci.com/g/tzsk/shorten-url/badges/build.png?b=master)](https://scrutinizer-ci.com/g/tzsk/shorten-url/build-status/master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tzsk/shorten-url/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tzsk/shorten-url/?branch=master)
[![Quality Score][ico-code-quality]][link-code-quality]
[![Total Downloads][ico-downloads]][link-downloads]
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
}
],
"require": {
"illuminate/support": "~5.1",
"php" : "~5.6|~7.0"
"illuminate/support": "~5.7|~5.8|~6.0",
"php" : "^7.2"
},
"require-dev": {
"phpunit/phpunit" : "~4.0||~5.0",
"squizlabs/php_codesniffer": "^2.3 || ^3.0"
"phpunit/phpunit" : "^8.0",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 0 additions & 3 deletions src/Config/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@
*/

'key' => null,


];

4 changes: 2 additions & 2 deletions src/Facade/GoogleUrl.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Tzsk\ShortenUrl\Facade;

namespace Tzsk\ShortenUrl\Facade;

use Illuminate\Support\Facades\Facade;

Expand All @@ -10,4 +10,4 @@ public static function getFacadeAccessor()
{
return 'tzsk-shorten-url';
}
}
}
9 changes: 4 additions & 5 deletions src/GoogleUrlShortener.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Tzsk\ShortenUrl;

namespace Tzsk\ShortenUrl;

class GoogleUrlShortener
{
Expand Down Expand Up @@ -111,7 +111,7 @@ public function expand($shortUrl)
*/
private function getShorternerResponse($longUrl)
{
if (!$this->extended && !empty(self::$buffer[$longUrl]) ) {
if (!$this->extended && !empty(self::$buffer[$longUrl])) {
return self::$buffer[$longUrl];
}

Expand All @@ -125,10 +125,9 @@ private function getShorternerResponse($longUrl)
/**
* Destroy Curl.
*/
function __destruct()
public function __destruct()
{
curl_close($this->curl);
$this->curl = null;
}

}
}
6 changes: 3 additions & 3 deletions src/Provider/ShortenUrlServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class ShortenUrlServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->app->singleton('tzsk-shorten-url', function($app) {
$this->app->singleton('tzsk-shorten-url', function ($app) {
return new GoogleUrlShortener($app);
});

$this->publishes([
__DIR__ . "/../Config/url.php" => config_path("url.php")
__DIR__ . '/../Config/url.php' => config_path('url.php')
], 'config');
}

Expand All @@ -32,4 +32,4 @@ public function register()
{
//
}
}
}

0 comments on commit a32eddc

Please sign in to comment.