Skip to content

Commit

Permalink
test: code styling test added
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Oct 25, 2023
1 parent 0b243a8 commit 63a085b
Show file tree
Hide file tree
Showing 789 changed files with 2,521 additions and 4,002 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@ jobs:
- name: Running Bagisto Installer
run: php artisan bagisto:install

- name: Running Code Style Test
run: vendor/bin/pint --test

- name: Running Test
run: vendor/bin/pest --colors=always
5 changes: 2 additions & 3 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Kernel extends ConsoleKernel
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
Expand All @@ -35,8 +34,8 @@ protected function schedule(Schedule $schedule)
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__.'/../../packages/Webkul/Core/src/Console/Commands');
$this->load(__DIR__ . '/Commands');
$this->load(__DIR__ . '/../../packages/Webkul/Core/src/Console/Commands');

require base_path('routes/console.php');
}
Expand Down
4 changes: 1 addition & 3 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Exceptions;

use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
{
Expand All @@ -29,7 +29,6 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param \Throwable $exception
* @return void
*/
public function report(Throwable $exception)
Expand All @@ -41,7 +40,6 @@ public function report(Throwable $exception)
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Throwable $exception)
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
Expand Down
18 changes: 9 additions & 9 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Kernel extends HttpKernel
],

'api' => [
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];
Expand All @@ -54,14 +54,14 @@ class Kernel extends HttpKernel
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'cacheResponse' => \Spatie\ResponseCache\Middlewares\CacheResponse::class,
];
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/EncryptCookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ class EncryptCookies extends Middleware
'sidebar_collapsed',
'dark_mode',
];
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/RedirectIfAuthenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public function handle(Request $request, Closure $next, string ...$guards): Resp

return $next($request);
}
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrimStrings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class TrimStrings extends Middleware
'password',
'password_confirmation',
];
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrustHosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public function hosts(): array
$this->allSubdomainsOfApplicationUrl(),
];
}
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ class TrustProxies extends Middleware
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
}
2 changes: 1 addition & 1 deletion app/Http/Middleware/VerifyCsrfToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ class VerifyCsrfToken extends Middleware
protected $except = [
//
];
}
}
6 changes: 1 addition & 5 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
Expand All @@ -19,8 +17,6 @@ public function boot(): void

/**
* Register any application services.
*
* @return void
*/
public function register(): void
{
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public function boot(): void
{
//
}
}
}
2 changes: 1 addition & 1 deletion app/Providers/BroadcastServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public function boot(): void

require base_path('routes/channels.php');
}
}
}
4 changes: 2 additions & 2 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace App\Providers;

use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;

class EventServiceProvider extends ServiceProvider
{
Expand All @@ -29,4 +29,4 @@ public function boot()
{
parent::boot();
}
}
}
2 changes: 1 addition & 1 deletion app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ protected function configureRateLimiting(): void
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}
}
2 changes: 1 addition & 1 deletion bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
realpath(__DIR__ . '/../')
);

/*
Expand Down
12 changes: 6 additions & 6 deletions config/broadcasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@

'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],

'redis' => [
'driver' => 'redis',
'driver' => 'redis',
'connection' => 'default',
],

Expand Down
18 changes: 9 additions & 9 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@
],

'database' => [
'driver' => 'database',
'table' => 'cache',
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'path' => storage_path('framework/cache/data'),
],

'memcached' => [
'driver' => 'memcached',
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
Expand All @@ -61,18 +61,18 @@
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],

'redis' => [
'driver' => 'redis',
'driver' => 'redis',
'connection' => env('CACHE_CONNECTION', 'cache'),
],

],

/*
Expand Down
2 changes: 0 additions & 2 deletions config/concord.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
* Example:
* VendorA\ModuleX\Providers\ModuleServiceProvider::class,
* VendorB\ModuleY\Providers\ModuleServiceProvider::class
*
*/

\Webkul\Admin\Providers\ModuleServiceProvider::class,
\Webkul\Attribute\Providers\ModuleServiceProvider::class,
\Webkul\CartRule\Providers\ModuleServiceProvider::class,
Expand Down
Loading

0 comments on commit 63a085b

Please sign in to comment.