Remove duplicated function
This commit is contained in:
parent
92fe6b7146
commit
b2300f4cfb
@ -17,8 +17,7 @@
|
|||||||
namespace Aviat\AnimeClient;
|
namespace Aviat\AnimeClient;
|
||||||
|
|
||||||
use function Aviat\AnimeClient\loadToml;
|
use function Aviat\AnimeClient\loadToml;
|
||||||
|
use function Aviat\Ion\_dir;
|
||||||
use Aviat\AnimeClient\AnimeClient;
|
|
||||||
|
|
||||||
// Work around the silly timezone error
|
// Work around the silly timezone error
|
||||||
$timezone = ini_get('date.timezone');
|
$timezone = ini_get('date.timezone');
|
||||||
|
@ -28,18 +28,6 @@ const NOT_FOUND_METHOD = 'notFound';
|
|||||||
const ERROR_MESSAGE_METHOD = 'errorPage';
|
const ERROR_MESSAGE_METHOD = 'errorPage';
|
||||||
const SRC_DIR = SRC_DIR;
|
const SRC_DIR = SRC_DIR;
|
||||||
|
|
||||||
/**
|
|
||||||
* Joins paths together. Variadic to take an
|
|
||||||
* arbitrary number of arguments
|
|
||||||
*
|
|
||||||
* @param string[] ...$args
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function _dir(...$args)
|
|
||||||
{
|
|
||||||
return implode(DIRECTORY_SEPARATOR, $args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load configuration options from .toml files
|
* Load configuration options from .toml files
|
||||||
*
|
*
|
||||||
|
@ -18,7 +18,7 @@ namespace Aviat\AnimeClient;
|
|||||||
|
|
||||||
use const Aviat\AnimeClient\SESSION_SEGMENT;
|
use const Aviat\AnimeClient\SESSION_SEGMENT;
|
||||||
|
|
||||||
use function Aviat\AnimeClient\_dir;
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use Aviat\AnimeClient\API\JsonAPI;
|
use Aviat\AnimeClient\API\JsonAPI;
|
||||||
use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
|
use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
|
||||||
|
@ -18,7 +18,7 @@ namespace Aviat\AnimeClient;
|
|||||||
|
|
||||||
use const Aviat\AnimeClient\SESSION_SEGMENT;
|
use const Aviat\AnimeClient\SESSION_SEGMENT;
|
||||||
|
|
||||||
use function Aviat\AnimeClient\_dir;
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use Aviat\AnimeClient\API\JsonAPI;
|
use Aviat\AnimeClient\API\JsonAPI;
|
||||||
use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
|
use Aviat\Ion\Di\{ContainerAware, ContainerInterface};
|
||||||
|
@ -24,7 +24,7 @@ use const Aviat\AnimeClient\{
|
|||||||
SRC_DIR
|
SRC_DIR
|
||||||
};
|
};
|
||||||
|
|
||||||
use function Aviat\AnimeClient\_dir;
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use Aviat\Ion\Di\ContainerInterface;
|
use Aviat\Ion\Di\ContainerInterface;
|
||||||
use Aviat\Ion\Friend;
|
use Aviat\Ion\Friend;
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<?php declare(strict_types=1);
|
|
||||||
/**
|
|
||||||
* Hummingbird Anime List Client
|
|
||||||
*
|
|
||||||
* An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
|
|
||||||
*
|
|
||||||
* PHP version 7
|
|
||||||
*
|
|
||||||
* @package HummingbirdAnimeClient
|
|
||||||
* @author Timothy J. Warren <tim@timshomepage.net>
|
|
||||||
* @copyright 2015 - 2017 Timothy J. Warren
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
||||||
* @version 4.0
|
|
||||||
* @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Aviat\AnimeClient\Tests;
|
|
||||||
|
|
||||||
use function Aviat\AnimeClient\_dir;
|
|
||||||
|
|
||||||
class AnimeClientTest extends AnimeClientTestCase {
|
|
||||||
/**
|
|
||||||
* Basic sanity test for _dir function
|
|
||||||
*/
|
|
||||||
public function testDir()
|
|
||||||
{
|
|
||||||
$this->assertEquals('foo' . \DIRECTORY_SEPARATOR . 'bar', _dir('foo', 'bar'));
|
|
||||||
}
|
|
||||||
}
|
|
@ -18,7 +18,7 @@ namespace Aviat\AnimeClient\Tests;
|
|||||||
|
|
||||||
use const Aviat\AnimeClient\SRC_DIR;
|
use const Aviat\AnimeClient\SRC_DIR;
|
||||||
|
|
||||||
use function Aviat\AnimeClient\_dir;
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use Aura\Web\WebFactory;
|
use Aura\Web\WebFactory;
|
||||||
use Aviat\Ion\Json;
|
use Aviat\Ion\Json;
|
||||||
|
Loading…
Reference in New Issue
Block a user