Skip to content

Commit

Permalink
Update code structure.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Feb 24, 2020
1 parent 665958c commit 83291e9
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 124 deletions.
1 change: 0 additions & 1 deletion Concerns/PassThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ trait PassThrough
* Determine if the request has a URI that should pass through CSRF verification.
*
* @param \Illuminate\Http\Request $request
* @param array $routesToExclude
*
* @return bool
*/
Expand Down
13 changes: 0 additions & 13 deletions Concerns/Transformable.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ trait Transformable
/**
* Add options.
*
* @param array $options
*
* @return $this
*/
public function options(array $options = [])
Expand Down Expand Up @@ -78,9 +76,6 @@ public function setRequest($request)
* Merge meta options.
*
* @param string|array $meta
* @param array $options
*
* @return array
*/
protected function merge($meta, array $options = []): array
{
Expand All @@ -104,11 +99,7 @@ protected function merge($meta, array $options = []): array
/**
* Resolve includes for transformer.
*
* @param string $group
* @param array $data
* @param mixed $parameters
*
* @return array
*/
protected function transformByMeta(string $meta, array $data, ...$parameters): array
{
Expand Down Expand Up @@ -136,10 +127,6 @@ protected function transformByMeta(string $meta, array $data, ...$parameters): a

/**
* Get option by group.
*
* @param string $name
*
* @return void
*/
protected function filterMetaType(string $name): void
{
Expand Down
1 change: 0 additions & 1 deletion Middleware/NotModified.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class NotModified
* Handle the given request and get the response.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return \Illuminate\Http\Response
*/
Expand Down
6 changes: 1 addition & 5 deletions Middleware/RequireCsrfToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RequireCsrfToken
/**
* The application instance.
*
* @var \Illuminate\Foundation\Application
* @var \Illuminate\Contracts\Foundation\Application
*/
protected $app;

Expand All @@ -25,9 +25,6 @@ class RequireCsrfToken

/**
* Create a new filter instance.
*
* @param \Illuminate\Foundation\Application $app
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
*/
public function __construct(Application $app, Encrypter $encrypter)
{
Expand All @@ -39,7 +36,6 @@ public function __construct(Application $app, Encrypter $encrypter)
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
Expand Down
4 changes: 0 additions & 4 deletions Providers/VersionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public function register()

/**
* Register supported version.
*
* @param \Orchestra\Http\VersionControl $version
*
* @return void
*/
protected function registerSupportedVersions(VersionControl $version): void
{
Expand Down
38 changes: 0 additions & 38 deletions RouteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ abstract class RouteManager implements RouteManagerContract

/**
* Construct a new instance.
*
* @param \Illuminate\Contracts\Container\Container $app
* @param \Orchestra\Http\RouteResolver|null $resolver
*/
public function __construct(Container $app, ?RouteResolver $resolver = null)
{
Expand All @@ -46,8 +43,6 @@ public function __construct(Container $app, ?RouteResolver $resolver = null)
/**
* Resolve application router.
*
* @param \Illuminate\Contracts\Container\Container $app
*
* @return mixed
*/
protected function resolveApplicationRouter(Container $app)
Expand All @@ -58,12 +53,7 @@ protected function resolveApplicationRouter(Container $app)
/**
* Return route group dispatch for a package/app.
*
* @param string $name
* @param string $default
* @param array|\Closure $attributes
* @param \Closure|null $callback
*
* @return array
*/
public function group(string $name, string $default, $attributes = [], Closure $callback = null): array
{
Expand All @@ -85,11 +75,6 @@ public function group(string $name, string $default, $attributes = [], Closure $

/**
* Return locate handles configuration for a package/app.
*
* @param string $path
* @param array $options
*
* @return array
*/
public function locate(string $path, array $options = []): array
{
Expand All @@ -98,11 +83,6 @@ public function locate(string $path, array $options = []): array

/**
* Return handles URL for a package/app.
*
* @param string $path
* @param array $options
*
* @return string
*/
public function handles(string $path, array $options = []): string
{
Expand All @@ -111,10 +91,6 @@ public function handles(string $path, array $options = []): string

/**
* Return if handles URL match given string.
*
* @param string $path
*
* @return bool
*/
public function is(string $path): bool
{
Expand All @@ -123,15 +99,11 @@ public function is(string $path): bool

/**
* Get installation status.
*
* @return bool
*/
abstract public function installed(): bool;

/**
* Get application status.
*
* @return string
*/
public function mode(): string
{
Expand All @@ -141,9 +113,6 @@ public function mode(): string
/**
* Get extension route.
*
* @param string $name
* @param string $default
*
* @return \Orchestra\Contracts\Extension\UrlGenerator
*/
public function route(string $name, string $default = '/')
Expand All @@ -154,10 +123,7 @@ public function route(string $name, string $default = '/')
/**
* Run the callback when route is matched.
*
* @param string $path
* @param mixed $listener
*
* @return void
*/
public function when(string $path, $listener): void
{
Expand All @@ -167,11 +133,7 @@ public function when(string $path, $listener): void
/**
* Run the callback when route is matched.
*
* @param string $path
* @param string $on
* @param mixed $listener
*
* @return void
*/
public function whenOn(string $path, string $on, $listener): void
{
Expand Down
42 changes: 0 additions & 42 deletions RouteResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class RouteResolver

/**
* Construct a new instance.
*
* @param \Illuminate\Contracts\Container\Container $app
*/
public function __construct(Container $app)
{
Expand All @@ -64,10 +62,6 @@ public function __construct(Container $app)

/**
* Integrate with Orchestra Extension.
*
* @param \Illuminate\Contracts\Container\Container $app
*
* @return void
*/
protected function integrateWithExtension(Container $app): void
{
Expand All @@ -82,10 +76,6 @@ protected function integrateWithExtension(Container $app): void

/**
* Return if handles URL match given string.
*
* @param string $path
*
* @return bool
*/
public function is(string $path): bool
{
Expand All @@ -96,11 +86,6 @@ public function is(string $path): bool

/**
* Return locate handles configuration for a package/app.
*
* @param string $path
* @param array $options
*
* @return array
*/
public function locate(string $path, array $options = []): array
{
Expand All @@ -127,9 +112,6 @@ public function locate(string $path, array $options = []): array
/**
* Get extension route.
*
* @param string $name
* @param string $default
*
* @return \Orchestra\Contracts\Extension\UrlGenerator
*/
public function route(string $name, string $default = '/')
Expand All @@ -143,8 +125,6 @@ public function route(string $name, string $default = '/')

/**
* Get application mode.
*
* @return string
*/
public function mode(): string
{
Expand All @@ -157,11 +137,6 @@ public function mode(): string

/**
* Return handles URL for a package/app.
*
* @param string $path
* @param array $options
*
* @return string
*/
public function to(string $path, array $options = []): string
{
Expand All @@ -182,9 +157,6 @@ public function to(string $path, array $options = []): string
/**
* Generate route by name.
*
* @param string $name
* @param string $default
*
* @return \Orchestra\Contracts\Extension\UrlGenerator
*/
protected function generateRouteByName(string $name, string $default)
Expand All @@ -199,13 +171,6 @@ protected function generateRouteByName(string $name, string $default)
/**
* Prepare valid route, since we already extract package from route
* we can re-append query string to route value.
*
* @param string $route
* @param string|null $item
* @param string $query
* @param array $options
*
* @return string
*/
protected function prepareValidRoute(string $route, ?string $item, string $query, array $options): string
{
Expand All @@ -231,11 +196,6 @@ protected function prepareValidRoute(string $route, ?string $item, string $query

/**
* Prepare HTTP query string.
*
* @param string $query
* @param array $appends
*
* @return string
*/
protected function prepareHttpQueryString(string $query, array $appends = []): string
{
Expand All @@ -248,8 +208,6 @@ protected function prepareHttpQueryString(string $query, array $appends = []): s

/**
* Get CSRF Token.
*
* @return string|null
*/
protected function getCsrfToken(): ?string
{
Expand Down
1 change: 0 additions & 1 deletion Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ abstract class Transformer extends BaseTransformer
* Invoke the transformation.
*
* @param mixed $instance
* @param array $options
*
* @return mixed
*/
Expand Down
6 changes: 0 additions & 6 deletions Transformer/InteractsWithDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ trait InteractsWithDateTime

/**
* Get timezone from request header.
*
* @return string
*/
protected function getTimezoneFromRequestHeader(): string
{
Expand All @@ -30,8 +28,6 @@ protected function getTimezoneFromRequestHeader(): string
/**
* Convert Carbon to datetime string or return null.
*
* @param \Carbon\Carbon|null $datetime
*
* @return string|null
*/
protected function toDateString(Carbon $datetime = null)
Expand All @@ -44,8 +40,6 @@ protected function toDateString(Carbon $datetime = null)
/**
* Convert Carbon to datetime string or return null.
*
* @param \Carbon\Carbon|null $datetime
*
* @return string|null
*/
protected function toDatetimeString(Carbon $datetime = null)
Expand Down
13 changes: 0 additions & 13 deletions VersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ class VersionControl
/**
* Add version.
*
* @param string $code
* @param string $namespace
* @param bool $default
*
* @return $this
*/
public function addVersion(string $code, string $namespace, bool $default = false)
Expand All @@ -43,8 +39,6 @@ public function addVersion(string $code, string $namespace, bool $default = fals
/**
* Set default version.
*
* @param string $code
*
* @throws \InvalidArgumentException
*
* @return $this
Expand All @@ -62,13 +56,6 @@ public function setDefaultVersion(string $code)

/**
* Resolve version for requested class.
*
* @param string $namespace
* @param string $version
* @param string $group
* @param string $name
*
* @return string
*/
public function resolve(string $namespace, string $version, string $name): string
{
Expand Down

0 comments on commit 83291e9

Please sign in to comment.