Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Fix typo errors and PHPDoc comments. #159

Merged
1 commit merged into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Config/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'final' => [
'key' => true,
'publish' => false
],
],
'requirements' => [
'php' => [
'openssl',
Expand Down Expand Up @@ -55,7 +55,7 @@
| Environment Form Wizard Validation Rules & Messages
|--------------------------------------------------------------------------
|
| This are the default form vield validation rules. Available Rules:
| This are the default form field validation rules. Available Rules:
| https://laravel.com/docs/5.4/validation#available-validation-rules
|
*/
Expand Down Expand Up @@ -99,7 +99,7 @@

/*
|--------------------------------------------------------------------------
| Installed Middlware Options
| Installed Middleware Options
|--------------------------------------------------------------------------
| Different available status switch configuration for the
| canInstall middleware located in `canInstall.php`.
Expand All @@ -122,9 +122,9 @@

/*
|--------------------------------------------------------------------------
| Selected Installed Middlware Option
| Selected Installed Middleware Option
|--------------------------------------------------------------------------
| The selected option fo what happens when an installer intance has been
| The selected option fo what happens when an installer instance has been
| Default output is to `/resources/views/error/404.blade.php` if none.
| The available middleware options include:
| route, abort, dump, 404, default, ''
Expand Down
3 changes: 1 addition & 2 deletions src/Controllers/EnvironmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

namespace RachidLaasri\LaravelInstaller\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Routing\Controller;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use RachidLaasri\LaravelInstaller\Helpers\EnvironmentManager;
use RachidLaasri\LaravelInstaller\Events\EnvironmentSaved;
use Validator;
use Illuminate\Validation\Rule;

class EnvironmentController extends Controller
{
Expand Down
8 changes: 5 additions & 3 deletions src/Controllers/FinalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ class FinalController extends Controller
/**
* Update installed file and display finished view.
*
* @param InstalledFileManager $fileManager
* @return \Illuminate\View\View
* @param \RachidLaasri\LaravelInstaller\Helpers\InstalledFileManager $fileManager
* @param \RachidLaasri\LaravelInstaller\Helpers\FinalInstallManager $finalInstall
* @param \RachidLaasri\LaravelInstaller\Helpers\EnvironmentManager $environment
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function finish(InstalledFileManager $fileManager, FinalInstallManager $finalInstall, EnvironmentManager $environment)
{
$finalMessages = $finalInstall->runFinal();
$finalStatusMessage = $fileManager->update();
$finalEnvFile = $environment->getEnvContent();

event(new LaravelInstallerFinished);

return view('vendor.installer.finished', compact('finalMessages', 'finalStatusMessage', 'finalEnvFile'));
Expand Down
1 change: 0 additions & 1 deletion src/Controllers/PermissionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace RachidLaasri\LaravelInstaller\Controllers;

use App\Http\Requests;
use Illuminate\Routing\Controller;
use RachidLaasri\LaravelInstaller\Helpers\PermissionsChecker;

Expand Down
4 changes: 1 addition & 3 deletions src/Controllers/WelcomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace RachidLaasri\LaravelInstaller\Controllers;

use App\Http\Controllers\Controller;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller;

class WelcomeController extends Controller
{
Expand Down
5 changes: 4 additions & 1 deletion src/Events/EnvironmentSaved.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ class EnvironmentSaved
{
use Dispatchable, InteractsWithSockets, SerializesModels;

private $request;

/**
* Create a new event instance.
*
* @param Request $request
* @return void
*/
public function __construct(Request $request)
{
$this->request = $request;
}

public function getRequest()
{
return $this->request;
Expand Down
22 changes: 11 additions & 11 deletions src/Helpers/DatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public function migrateAndSeed()
/**
* Run the migration and call the seeder.
*
* @param collection $outputLog
* @return collection
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
* @return array
*/
private function migrate($outputLog)
private function migrate(BufferedOutput $outputLog)
{
try{
Artisan::call('migrate', ["--force"=> true], $outputLog);
Expand All @@ -46,10 +46,10 @@ private function migrate($outputLog)
/**
* Seed the database.
*
* @param collection $outputLog
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
* @return array
*/
private function seed($outputLog)
private function seed(BufferedOutput $outputLog)
{
try{
Artisan::call('db:seed', ['--force' => true], $outputLog);
Expand All @@ -64,12 +64,12 @@ private function seed($outputLog)
/**
* Return a formatted error messages.
*
* @param $message
* @param string $message
* @param string $status
* @param collection $outputLog
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
* @return array
*/
private function response($message, $status = 'danger', $outputLog)
private function response($message, $status = 'danger', BufferedOutput $outputLog)
{
return [
'status' => $status,
Expand All @@ -79,11 +79,11 @@ private function response($message, $status = 'danger', $outputLog)
}

/**
* check database type. If SQLite, then create the database file.
* Check database type. If SQLite, then create the database file.
*
* @param collection $outputLog
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
*/
private function sqlite($outputLog)
private function sqlite(BufferedOutput $outputLog)
{
if(DB::connection() instanceof SQLiteConnection) {
$database = DB::connection()->getDatabaseName();
Expand Down
20 changes: 10 additions & 10 deletions src/Helpers/FinalInstallManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FinalInstallManager
/**
* Run final commands.
*
* @return collection
* @return string
*/
public function runFinal()
{
Expand All @@ -26,10 +26,10 @@ public function runFinal()
/**
* Generate New Application Key.
*
* @param collection $outputLog
* @return collection
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
* @return \Symfony\Component\Console\Output\BufferedOutput|array
*/
private static function generateKey($outputLog)
private static function generateKey(BufferedOutput $outputLog)
{
try{
if (config('installer.final.key')){
Expand All @@ -46,10 +46,10 @@ private static function generateKey($outputLog)
/**
* Publish vendor assets.
*
* @param collection $outputLog
* @return collection
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
* @return \Symfony\Component\Console\Output\BufferedOutput|array
*/
private static function publishVendorAssets($outputLog)
private static function publishVendorAssets(BufferedOutput $outputLog)
{
try{
if (config('installer.final.publish')){
Expand All @@ -62,15 +62,15 @@ private static function publishVendorAssets($outputLog)

return $outputLog;
}

/**
* Return a formatted error messages.
*
* @param $message
* @param collection $outputLog
* @param \Symfony\Component\Console\Output\BufferedOutput $outputLog
* @return array
*/
private static function response($message, $outputLog)
private static function response($message, BufferedOutput $outputLog)
{
return [
'status' => 'error',
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/MigrationsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function getMigrations()
/**
* Get the migrations that have already been ran.
*
* @return Illuminate\Support\Collection List of migrations
* @return \Illuminate\Support\Collection List of migrations
*/
public function getExecutedMigrations()
{
Expand Down
4 changes: 1 addition & 3 deletions src/Middleware/canInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ class canInstall
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
* @param Redirector $redirect
* @return \Illuminate\Http\RedirectResponse
* @return \Illuminate\Http\RedirectResponse|mixed
*/
public function handle($request, Closure $next)
{
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/canUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace RachidLaasri\LaravelInstaller\Middleware;

use Closure;
use RachidLaasri\LaravelInstaller\Middleware\canInstall;

class canUpdate
{
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/LaravelInstallerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function register()
/**
* Bootstrap the application events.
*
* @param $void
* @param \Illuminate\Routing\Router $router
*/
public function boot(Router $router)
{
Expand Down