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

Commit

Permalink
Resolves #32
Browse files Browse the repository at this point in the history
  • Loading branch information
jelovac committed Jun 8, 2017
1 parent e0dafde commit f47ec7a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Jelovac/Bitly4laravel/Bitly4laravel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php namespace Jelovac\Bitly4laravel;
<?php

class Bitly4laravel extends API implements BitlyInterface {
namespace Jelovac\Bitly4laravel;

class Bitly4laravel extends API implements BitlyInterface
{

/**
* Archive a bundle for the authenticated user. Only a bundle's owner is allowed to archive a bundle.
Expand Down Expand Up @@ -368,10 +371,10 @@ public function expand($shortURLOrHash)
{
$params = array();

if (filter_var($shortURLOrHash, FILTER_VALIDATE_URL) === true) {
$params['shortUrl'] = $shortURLOrHash;
} else {
if (filter_var($shortURLOrHash, FILTER_VALIDATE_URL) === false) {
$params['hash'] = $shortURLOrHash;
} else {
$params['shortUrl'] = $shortURLOrHash;
}

return $this->make('expand', $params);
Expand Down Expand Up @@ -406,10 +409,10 @@ public function info($shortURLOrHash, $expandUser = null)
{
$params = array();

if (filter_var($shortURLOrHash, FILTER_VALIDATE_URL) === true) {
$params['shortUrl'] = $shortURLOrHash;
} else {
if (filter_var($shortURLOrHash, FILTER_VALIDATE_URL) === false) {
$params['hash'] = $shortURLOrHash;
} else {
$params['shortUrl'] = $shortURLOrHash;
}

if ($expandUser !== null) {
Expand Down

0 comments on commit f47ec7a

Please sign in to comment.