Skip to content

Commit

Permalink
change namespace, fix psr autoloading and fix testcase namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
arif98741 committed Oct 24, 2021
1 parent dffb961 commit c442903
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 44 deletions.
29 changes: 0 additions & 29 deletions UnitTestFiles/Functionality/FunctionalityTest.php

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "arif98741/nagad-api",
"name": "xenon/nagad-api",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Ariful Islam",
"email": "arif98741@gmail.com",
"homepage": "https://phpdark.com",
"homepage": "https://github.com/arif98741",
"role": "Developer, Maintainer"
}
],
"autoload": {
"psr-4": {
"NagadApi\\": "src/"
"Xenon\\NagadApi\\": "src/"
},
"psr-0": {
"UnitTestFiles": ""
}
},
"support": {
"email": "admin@phpdark.com"
"email": "arif98741@gmail.com"
},
"require": {
"php": "^5.5 || ^7.0 || ^8.0",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Installation Process

```bash
composer require arif98741/nagad-api
composer require xenon/nagad-api
```

# Example Code
Expand Down
7 changes: 3 additions & 4 deletions src/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
* ----------------------------------------------------------------
*/

namespace NagadApi;
namespace Xenon\NagadApi;


use NagadApi\lib\Key;

use Xenon\NagadApi\lib\Key;
/**
* Class Base
* This is the decision maker where request will go, generate url and also
Expand Down Expand Up @@ -78,7 +77,7 @@ public function __construct($config, $params)

/**
* Before activating production environment be confirm that your system is ok and out of bug
* it is highly recommended to test your environment using development environment
* it is highly recommended to Test your environment using development environment
* your ip,domain and callback_url should be whitelisted in Nagad end
*/
if ($this->keyObject->getAppEnv() == 'production') {
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ExceptionHandler.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php


namespace NagadApi\Exception;
namespace Xenon\NagadApi\Exception;


use Throwable;
Expand Down
4 changes: 2 additions & 2 deletions src/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
* See my profile @ https://github.com/arif98741
* ----------------------------------------------------------------
*/
namespace NagadApi;
namespace Xenon\NagadApi;


use GuzzleHttp\Exception\GuzzleException;
use NagadApi\Exception\ExceptionHandler;
use NagadApi\lib\Key;
use Xenon\NagadApi\lib\Key;

class Helper extends Key
{
Expand Down
2 changes: 1 addition & 1 deletion src/RequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* ----------------------------------------------------------------
*/

namespace NagadApi;
namespace Xenon\NagadApi;

use Exception;
use NagadApi\Exception\ExceptionHandler;
Expand Down
20 changes: 20 additions & 0 deletions src/Test/Functionality/FeatureTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Xenon\NagadApi\Test\Functionality;

use Exception;
use PHPUnit\Framework\TestCase;

class FeatureTest extends TestCase
{
/**
* @throws Exception
* @throws Exception
*/
public function testTrueAssetsToTrue()
{
$condition = true;
$this->assertTrue(true);
}

}
File renamed without changes.
4 changes: 2 additions & 2 deletions src/lib/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
* ----------------------------------------------------------------
*/

namespace NagadApi\lib;
namespace Xenon\NagadApi\lib;

/**
* Class Key
* This class is using for generating data from environment variable .env
* This any change in .env file will affect array vale of $_ENV; Array value of
* .env can be easily find using generateEnv of Key object
* @package NagadApi\lib
* @package Xenon\NagadApi\lib
*/
class Key
{
Expand Down

0 comments on commit c442903

Please sign in to comment.