Skip to content
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
14 changes: 7 additions & 7 deletions src/Commands/Bases/ControllerCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getFillables(array $fields)
}

/**
* Gets laravel ready field validation format from a giving string
* Gets laravel ready field validation format from a given string
*
* @param string $validations
*
Expand Down Expand Up @@ -87,7 +87,7 @@ protected function getValidationRules(array $fields)
}

/**
* Extracts the custom validation rules' short name from the giving rules array.
* Extracts the custom validation rules' short name from the given rules array.
*
* @param array $rules
*
Expand All @@ -112,7 +112,7 @@ protected function extractCustomValidationShortName(array $rules)
}

/**
* Extracts the custom validation rules' short name from the giving rules array.
* Extracts the custom validation rules' short name from the given rules array.
*
* @param array $rules
*
Expand All @@ -134,7 +134,7 @@ protected function extractCustomValidationNamespaces(array $rules)
}

/**
* Extracts the custom validation rules from the giving rules array.
* Extracts the custom validation rules from the given rules array.
*
* @param array $rules
*
Expand Down Expand Up @@ -174,7 +174,7 @@ protected function makeCustomRuleCall($rule)
}

/**
* Get the short name of the giving custom validation rule.
* Get the short name of the given custom validation rule.
*
* @param string $rule
*
Expand All @@ -200,7 +200,7 @@ protected function canHaveUsingCommand($fullname)
}

/**
* Get the full class name of the giving custom valiation rule.
* Get the full class name of the given custom valiation rule.
*
* @param string $rule
*
Expand Down Expand Up @@ -453,7 +453,7 @@ protected function getRequestNameComment($name)
}

/**
* Replaces the visibility level of a giving stub
* Replaces the visibility level of a given stub
*
* @param string $stub
* @param string $level
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Bases/ResourceFileCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ResourceFileCommandBase extends Command
use CommonCommand;

/**
* Gets the resource from the giving file
* Gets the resource from the given file
*
* @param string $file
* @param array $languages
Expand Down
16 changes: 8 additions & 8 deletions src/Commands/Bases/ViewsCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function getDestinationViewName($action)
}

/**
* It Replaces the primaryKey, modelNames, routeNames in a giving stub
* It Replaces the primaryKey, modelNames, routeNames in a given stub
*
* @param string $stub
* @param CrestApps\CodeGenerator\Models\ViewInput $input
Expand Down Expand Up @@ -219,7 +219,7 @@ protected function replaceFormName(&$stub, $name)
}

/**
* Get the view's name of a giving file.
* Get the view's name of a given file.
*
* @param string $fillname
*
Expand All @@ -233,7 +233,7 @@ protected function getViewNameFromFile($filename)
}

/**
* It Replaces the layout name in a giving stub
* It Replaces the layout name in a given stub
*
* @param string $stub
* @param string $layout
Expand All @@ -246,7 +246,7 @@ protected function replaceLayoutName(&$stub, $layout)
}

/**
* It Replaces fieldUpload in the giving stub.
* It Replaces fieldUpload in the given stub.
*
* @param string $stub
* @param array $fields
Expand All @@ -261,7 +261,7 @@ protected function replaceFileUpload(&$stub, array $fields)
}

/**
* It gets the file attribute based on the giving template type.
* It gets the file attribute based on the given template type.
*
* @param string $template
*
Expand Down Expand Up @@ -296,7 +296,7 @@ protected function createMissingViews(ViewInput $input, array $views = ['form'])
}

/**
* It make a valid command for creating a giving view
* It make a valid command for creating a given view
*
* @param string $view
*
Expand Down Expand Up @@ -364,7 +364,7 @@ protected function getFullViewsPath($viewsDirectory, $routesPrefix)
}

/**
* Gets the primary key name from a giving fields collection
* Gets the primary key name from a given fields collection
*
* @param array $fields
*
Expand All @@ -378,7 +378,7 @@ protected function getPrimaryKeyName(array $fields)
}

/**
* Gets the primary key name from a giving fields collection
* Gets the primary key name from a given fields collection
*
* @param array $fields
* @param string $default
Expand Down
26 changes: 13 additions & 13 deletions src/Commands/CreateControllerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected function hasErrors(Resource $resource, $destenationFile)
}

if ($this->alreadyExists($destenationFile)) {
$this->error('The controller already exists!');
$this->error('The controller already exists! To override the existing file, use --force option.');

$hasErrors = true;
}
Expand All @@ -181,7 +181,7 @@ protected function hasErrors(Resource $resource, $destenationFile)
}

/**
* Extracts a namespace from a giving string
* Extracts a namespace from a given string
*
* @param string $string
*
Expand Down Expand Up @@ -241,7 +241,7 @@ protected function getDataMethod(array $fields, $requestFullname, $input)
}

/**
* Extracts a namespace from a giving string
* Extracts a namespace from a given string
*
* @param string $string
*
Expand Down Expand Up @@ -304,7 +304,7 @@ protected function getDataMethodStubContent()
}

/**
* Get a string to set a giving $variable with a $key and $value pair
* Get a string to set a given $variable with a $key and $value pair
*
* @param string $key
* @param string $value
Expand Down Expand Up @@ -400,7 +400,7 @@ protected function getCommandInput()
}

/**
* Converts giving array of variables to a compact statements.
* Converts given array of variables to a compact statements.
*
* @param array $variables
*
Expand Down Expand Up @@ -558,7 +558,7 @@ protected function getModelNamespace($modelName, $modelDirectory)
}

/**
* Gets the setter action for the giving field on-store.
* Gets the setter action for the given field on-store.
*
* @param array $fields
* @param string $view
Expand All @@ -580,7 +580,7 @@ protected function getOnStoreAction(array $fields)
}

/**
* Gets the setter action for the giving field on-update.
* Gets the setter action for the given field on-update.
*
* @param array $fields
* @param string $view
Expand All @@ -602,7 +602,7 @@ protected function getOnUpdateAction(array $fields)
}

/**
* Gets the relation accessor for the giving foreign renationship.
* Gets the relation accessor for the given foreign renationship.
*
* @param CrestApps\CodeGenerator\Models\ForeignRelationship $collection
*
Expand Down Expand Up @@ -767,7 +767,7 @@ protected function getWithRelationFor(array $fields, $view)
}

/**
* Converts giving array of relation name to a with() statements.
* Converts given array of relation name to a with() statements.
*
* @param array $variables
*
Expand All @@ -783,7 +783,7 @@ protected function getWithRelationsStatement(array $relations)
}

/**
* Checks if a giving fields array conatins at least one multiple answers' field.
* Checks if a given fields array conatins at least one multiple answers' field.
*
* @param array
*
Expand Down Expand Up @@ -980,7 +980,7 @@ protected function replacePaginationNumber(&$stub, $total)
}

/**
* Replaces relationCollections for the giving stub.
* Replaces relationCollections for the given stub.
*
* @param $stub
* @param $collections
Expand Down Expand Up @@ -1117,7 +1117,7 @@ protected function replaceViewVariablesForShow(&$stub, $variables)
}

/**
* Replaces withRelationsForIndex for the giving stub.
* Replaces withRelationsForIndex for the given stub.
*
* @param $stub
* @param $relations
Expand All @@ -1130,7 +1130,7 @@ protected function replaceWithRelationsForIndex(&$stub, $relations)
}

/**
* Replaces withRelationsForShow for the giving stub.
* Replaces withRelationsForShow for the given stub.
*
* @param $stub
* @param $relations
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/CreateFormViewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CreateFormViewCommand extends ViewsCommandBase
*
* @var string
*/
protected $description = 'Create a from-view for the model.';
protected $description = 'Create a form-view for the model.';

/**
* Gets the name of the stub to process.
Expand Down Expand Up @@ -65,7 +65,7 @@ protected function handleCreateView()
}

/**
* Replaces the form field's html code in a giving stub.
* Replaces the form field's html code in a given stub.
*
* @param string $stub
* @param string $fields
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/CreateIndexViewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function handleCreateView()
}

/**
* Replaces the column headers in a giving stub.
* Replaces the column headers in a given stub.
*
* @param string $stub
* @param string $header
Expand All @@ -78,7 +78,7 @@ protected function replaceHeaderCells(&$stub, $header)
}

/**
* Replaces the column cells in a giving stub.
* Replaces the column cells in a given stub.
*
* @param string $stub
* @param string $body
Expand Down
6 changes: 3 additions & 3 deletions src/Commands/CreateLanguageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected function appendMessageToFile($fileFullname, $messages)
}

/**
* Gets the index on where to append messages to of a giving stub.
* Gets the index on where to append messages to of a given stub.
*
* @param string $stub
*
Expand All @@ -190,7 +190,7 @@ protected function getCursorPosition($stub)
}

/**
* Creates a new language file with with a giving messages.
* Creates a new language file with with a given messages.
*
* @param string $fileFullname
* @param string $messages
Expand All @@ -208,7 +208,7 @@ protected function createMessageToFile($fileFullname, $messages, $language)
}

/**
* Gets the full path of a giving language
* Gets the full path of a given language
*
* @param string $language
*
Expand Down
Loading