Skip to content

Commit

Permalink
Refactor library/helpers.php (#1383)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Feb 29, 2024
2 parents e62b573 + b5d236c commit 190415a
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions library/helpers.php
Expand Up @@ -5,60 +5,51 @@
*
* @copyright https://github.com/mockery/mockery/blob/HEAD/COPYRIGHT.md
* @license https://github.com/mockery/mockery/blob/HEAD/LICENSE BSD 3-Clause License
*
* @link https://github.com/mockery/mockery for the canonical source repository
*/

use Mockery\Matcher\AndAnyOtherArgs;
use Mockery\Matcher\AnyArgs;

if (!function_exists("mock")) {
if (! \function_exists('mock')) {
function mock(...$args)
{
return Mockery::mock(...$args);
}
}

if (!function_exists("spy")) {
if (! \function_exists('spy')) {
function spy(...$args)
{
return Mockery::spy(...$args);
}
}

if (!function_exists("namedMock")) {
if (! \function_exists('namedMock')) {
function namedMock(...$args)
{
return Mockery::namedMock(...$args);
}
}

if (!function_exists("anyArgs")) {
if (! \function_exists('anyArgs')) {
function anyArgs()
{
return new AnyArgs();
}
}

if (!function_exists("andAnyOtherArgs")) {
if (! \function_exists('andAnyOtherArgs')) {
function andAnyOtherArgs()
{
return new AndAnyOtherArgs();
}
}

if (!function_exists("andAnyOthers")) {
if (! \function_exists('andAnyOthers')) {
function andAnyOthers()
{
return new AndAnyOtherArgs();
}
}
//
//$currentDirectory = dirname(__FILE__,2);
//$libraryDirectory = $currentDirectory . '/library';
//if (! file_exists($libraryDirectory))
//{
// symlink(
// $currentDirectory . '/library',
// $libraryDirectory
// );
//}

0 comments on commit 190415a

Please sign in to comment.