Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Robiya.O authored and Robiya.O committed Dec 14, 2023
1 parent b868bb2 commit 934dea1
Show file tree
Hide file tree
Showing 29 changed files with 60 additions and 73 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "robiya/rpc",
"description": "Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.",
"description": "JSON-RPC 2.0 server",
"keywords": [
"rpc",
"json-prc",
Expand All @@ -27,12 +27,12 @@
},
"autoload": {
"psr-4": {
"Sajya\\Server\\": "src"
"Robiya\\Rpc\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Sajya\\Server\\Tests\\": "tests"
"Robiya\\Rpc\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -44,16 +44,16 @@
},
"suggest": {
"ext-zlib": "Required to compress the response into gzip",
"sajya/client": "HTTP(S) client for JSON-RPC 2.0"
"robiya/client": "HTTP(S) client for JSON-RPC 2.0"
},
"prefer-stable": true,
"extra": {
"laravel": {
"providers": [
"Sajya\\Server\\ServerServiceProvider"
"Robiya\\Rpc\\ServerServiceProvider"
],
"aliases": {
"RPC": "Sajya\\Server\\Facades\\RPC"
"RPC": "Robiya\\Rpc\\Facades\\RPC"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Param.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Annotations;
namespace Robiya\Rpc\Annotations;

/**
* @Annotation
Expand Down
2 changes: 1 addition & 1 deletion src/Annotations/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Annotations;
namespace Robiya\Rpc\Annotations;

/**
* @Annotation
Expand Down
10 changes: 5 additions & 5 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

use Illuminate\Foundation\Application;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use ReflectionClass;
use ReflectionMethod;
use Sajya\Server\Exceptions\MethodNotFound;
use Sajya\Server\Http\Parser;
use Sajya\Server\Http\Request;
use Sajya\Server\Http\Response;
use Robiya\Rpc\Exceptions\MethodNotFound;
use Robiya\Rpc\Http\Parser;
use Robiya\Rpc\Http\Request;
use Robiya\Rpc\Http\Response;

class App
{
Expand Down
2 changes: 1 addition & 1 deletion src/Binding.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

use Closure;
use Illuminate\Container\Container;
Expand Down
8 changes: 4 additions & 4 deletions src/Commands/DocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Sajya\Server\Commands;
namespace Robiya\Rpc\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Storage;
use Sajya\Server\Docs;
use Robiya\Rpc\Docs;

class DocsCommand extends Command
{
Expand All @@ -16,7 +16,7 @@ class DocsCommand extends Command
*
* @var string
*/
protected $signature = 'sajya:docs {route}
protected $signature = 'rpc:docs {route}
{--name=docs.html : Name of the generated documentation}
{--path=/api/ : Path where included documentation files are located}';

Expand Down Expand Up @@ -48,7 +48,7 @@ public function handle(): int

$docs = new Docs($route);

$html = view('sajya::docs', [
$html = view('rpc::docs', [
'title' => config('app.name'),
'uri' => config('app.url').$route->uri(),
'procedures' => $docs->getAnnotations(),
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/ProcedureMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Commands;
namespace Robiya\Rpc\Commands;

use Illuminate\Console\GeneratorCommand;

Expand Down
6 changes: 3 additions & 3 deletions src/Docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

use Doctrine\Common\Annotations\AnnotationReader;
use Illuminate\Config\Repository;
Expand All @@ -13,8 +13,8 @@
use phpDocumentor\Reflection\DocBlockFactory;
use ReflectionClass;
use ReflectionMethod;
use Sajya\Server\Annotations\Param;
use Sajya\Server\Annotations\Result;
use Robiya\Rpc\Annotations\Param;
use Robiya\Rpc\Annotations\Result;

class Docs
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InternalErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

class InternalErrorException extends RpcException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

class InvalidParams extends RpcException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

class InvalidRequestException extends RpcException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MethodNotFound.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

class MethodNotFound extends RpcException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ParseErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

class ParseErrorException extends RpcException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/RpcException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

use JsonSerializable;
use RuntimeException;
Expand Down
3 changes: 1 addition & 2 deletions src/Exceptions/RuntimeRpcException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

declare(strict_types=1);

namespace Sajya\Server\Exceptions;
namespace Robiya\Rpc\Exceptions;

namespace Sajya\Server\Exceptions;

class RuntimeRpcException extends RpcException
{
Expand Down
6 changes: 3 additions & 3 deletions src/Facades/RPC.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

declare(strict_types=1);

namespace Sajya\Server\Facades;
namespace Robiya\Rpc\Facades;

use Illuminate\Support\Facades\Facade;
use Sajya\Server\Binding;
use Robiya\Rpc\Binding;

/**
* Class RPC
*
* @method static void bind(string $key, string|callable $binder)
* @method static void model(string $key, string $class, \Closure|null $callback = null)
*
* @see \Sajya\Server\Binding
* @see \Robiya\Rpc\Binding
*/
class RPC extends Facade
{
Expand Down
12 changes: 0 additions & 12 deletions src/Guide.php

This file was deleted.

14 changes: 7 additions & 7 deletions src/HandleProcedure.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
Expand All @@ -12,12 +12,12 @@
use Illuminate\Support\Facades\App;
use Illuminate\Support\Str;
use Illuminate\Validation\ValidationException;
use Sajya\Server\Exceptions\InternalErrorException;
use Sajya\Server\Exceptions\InvalidParams;
use Sajya\Server\Exceptions\RpcException;
use Sajya\Server\Exceptions\RuntimeRpcException;
use Sajya\Server\Facades\RPC;
use Sajya\Server\Http\Request;
use Robiya\Rpc\Exceptions\InternalErrorException;
use Robiya\Rpc\Exceptions\InvalidParams;
use Robiya\Rpc\Exceptions\RpcException;
use Robiya\Rpc\Exceptions\RuntimeRpcException;
use Robiya\Rpc\Facades\RPC;
use Robiya\Rpc\Http\Request;
use Throwable;

class HandleProcedure implements ShouldQueue
Expand Down
10 changes: 5 additions & 5 deletions src/Http/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

declare(strict_types=1);

namespace Sajya\Server\Http;
namespace Robiya\Rpc\Http;

use Exception;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Validator;
use Sajya\Server\Exceptions\InvalidParams;
use Sajya\Server\Exceptions\InvalidRequestException;
use Sajya\Server\Exceptions\ParseErrorException;
use Sajya\Server\Rules\Identifier;
use Robiya\Rpc\Exceptions\InvalidParams;
use Robiya\Rpc\Exceptions\InvalidRequestException;
use Robiya\Rpc\Exceptions\ParseErrorException;
use Robiya\Rpc\Rules\Identifier;
use TypeError;

class Parser
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Http;
namespace Robiya\Rpc\Http;

use Illuminate\Support\Collection;
use Illuminate\Support\Str;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Http;
namespace Robiya\Rpc\Http;

use Exception;
use JsonSerializable;
Expand Down
2 changes: 1 addition & 1 deletion src/JsonRpcController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/GzipCompress.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Middleware;
namespace Robiya\Rpc\Middleware;

use Closure;
use Illuminate\Http\JsonResponse;
Expand Down
2 changes: 1 addition & 1 deletion src/Procedure.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

abstract class Procedure
{
Expand Down
6 changes: 3 additions & 3 deletions src/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

declare(strict_types=1);

namespace Sajya\Server;
namespace Robiya\Rpc;

use Sajya\Server\Http\Request;
use Robiya\Rpc\Http\Request;

interface Proxy
{
/**
* The method used by request handlers.
*
* @param \Sajya\Server\Http\Request $request
* @param Request $request
*
* @return mixed
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/Identifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Sajya\Server\Rules;
namespace Robiya\Rpc\Rules;

use Illuminate\Contracts\Validation\Rule;

Expand Down
Loading

0 comments on commit 934dea1

Please sign in to comment.