Skip to content

Commit ad870bf

Browse files
authored
Merge pull request #48 from LoganGray/master
Fixed / typos / grammar etc for readability.
2 parents 46aa789 + a0a3281 commit ad870bf

39 files changed

+235
-235
lines changed

src/Commands/Bases/ControllerCommandBase.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function getFillables(array $fields)
4747
}
4848

4949
/**
50-
* Gets laravel ready field validation format from a giving string
50+
* Gets laravel ready field validation format from a given string
5151
*
5252
* @param string $validations
5353
*
@@ -87,7 +87,7 @@ protected function getValidationRules(array $fields)
8787
}
8888

8989
/**
90-
* Extracts the custom validation rules' short name from the giving rules array.
90+
* Extracts the custom validation rules' short name from the given rules array.
9191
*
9292
* @param array $rules
9393
*
@@ -112,7 +112,7 @@ protected function extractCustomValidationShortName(array $rules)
112112
}
113113

114114
/**
115-
* Extracts the custom validation rules' short name from the giving rules array.
115+
* Extracts the custom validation rules' short name from the given rules array.
116116
*
117117
* @param array $rules
118118
*
@@ -134,7 +134,7 @@ protected function extractCustomValidationNamespaces(array $rules)
134134
}
135135

136136
/**
137-
* Extracts the custom validation rules from the giving rules array.
137+
* Extracts the custom validation rules from the given rules array.
138138
*
139139
* @param array $rules
140140
*
@@ -174,7 +174,7 @@ protected function makeCustomRuleCall($rule)
174174
}
175175

176176
/**
177-
* Get the short name of the giving custom validation rule.
177+
* Get the short name of the given custom validation rule.
178178
*
179179
* @param string $rule
180180
*
@@ -200,7 +200,7 @@ protected function canHaveUsingCommand($fullname)
200200
}
201201

202202
/**
203-
* Get the full class name of the giving custom valiation rule.
203+
* Get the full class name of the given custom valiation rule.
204204
*
205205
* @param string $rule
206206
*
@@ -453,7 +453,7 @@ protected function getRequestNameComment($name)
453453
}
454454

455455
/**
456-
* Replaces the visibility level of a giving stub
456+
* Replaces the visibility level of a given stub
457457
*
458458
* @param string $stub
459459
* @param string $level

src/Commands/Bases/ResourceFileCommandBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ResourceFileCommandBase extends Command
1212
use CommonCommand;
1313

1414
/**
15-
* Gets the resource from the giving file
15+
* Gets the resource from the given file
1616
*
1717
* @param string $file
1818
* @param array $languages

src/Commands/Bases/ViewsCommandBase.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ protected function getDestinationViewName($action)
130130
}
131131

132132
/**
133-
* It Replaces the primaryKey, modelNames, routeNames in a giving stub
133+
* It Replaces the primaryKey, modelNames, routeNames in a given stub
134134
*
135135
* @param string $stub
136136
* @param CrestApps\CodeGenerator\Models\ViewInput $input
@@ -219,7 +219,7 @@ protected function replaceFormName(&$stub, $name)
219219
}
220220

221221
/**
222-
* Get the view's name of a giving file.
222+
* Get the view's name of a given file.
223223
*
224224
* @param string $fillname
225225
*
@@ -233,7 +233,7 @@ protected function getViewNameFromFile($filename)
233233
}
234234

235235
/**
236-
* It Replaces the layout name in a giving stub
236+
* It Replaces the layout name in a given stub
237237
*
238238
* @param string $stub
239239
* @param string $layout
@@ -246,7 +246,7 @@ protected function replaceLayoutName(&$stub, $layout)
246246
}
247247

248248
/**
249-
* It Replaces fieldUpload in the giving stub.
249+
* It Replaces fieldUpload in the given stub.
250250
*
251251
* @param string $stub
252252
* @param array $fields
@@ -261,7 +261,7 @@ protected function replaceFileUpload(&$stub, array $fields)
261261
}
262262

263263
/**
264-
* It gets the file attribute based on the giving template type.
264+
* It gets the file attribute based on the given template type.
265265
*
266266
* @param string $template
267267
*
@@ -296,7 +296,7 @@ protected function createMissingViews(ViewInput $input, array $views = ['form'])
296296
}
297297

298298
/**
299-
* It make a valid command for creating a giving view
299+
* It make a valid command for creating a given view
300300
*
301301
* @param string $view
302302
*
@@ -364,7 +364,7 @@ protected function getFullViewsPath($viewsDirectory, $routesPrefix)
364364
}
365365

366366
/**
367-
* Gets the primary key name from a giving fields collection
367+
* Gets the primary key name from a given fields collection
368368
*
369369
* @param array $fields
370370
*
@@ -378,7 +378,7 @@ protected function getPrimaryKeyName(array $fields)
378378
}
379379

380380
/**
381-
* Gets the primary key name from a giving fields collection
381+
* Gets the primary key name from a given fields collection
382382
*
383383
* @param array $fields
384384
* @param string $default

src/Commands/CreateControllerCommand.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected function hasErrors(Resource $resource, $destenationFile)
172172
}
173173

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

177177
$hasErrors = true;
178178
}
@@ -181,7 +181,7 @@ protected function hasErrors(Resource $resource, $destenationFile)
181181
}
182182

183183
/**
184-
* Extracts a namespace from a giving string
184+
* Extracts a namespace from a given string
185185
*
186186
* @param string $string
187187
*
@@ -241,7 +241,7 @@ protected function getDataMethod(array $fields, $requestFullname, $input)
241241
}
242242

243243
/**
244-
* Extracts a namespace from a giving string
244+
* Extracts a namespace from a given string
245245
*
246246
* @param string $string
247247
*
@@ -304,7 +304,7 @@ protected function getDataMethodStubContent()
304304
}
305305

306306
/**
307-
* Get a string to set a giving $variable with a $key and $value pair
307+
* Get a string to set a given $variable with a $key and $value pair
308308
*
309309
* @param string $key
310310
* @param string $value
@@ -400,7 +400,7 @@ protected function getCommandInput()
400400
}
401401

402402
/**
403-
* Converts giving array of variables to a compact statements.
403+
* Converts given array of variables to a compact statements.
404404
*
405405
* @param array $variables
406406
*
@@ -558,7 +558,7 @@ protected function getModelNamespace($modelName, $modelDirectory)
558558
}
559559

560560
/**
561-
* Gets the setter action for the giving field on-store.
561+
* Gets the setter action for the given field on-store.
562562
*
563563
* @param array $fields
564564
* @param string $view
@@ -580,7 +580,7 @@ protected function getOnStoreAction(array $fields)
580580
}
581581

582582
/**
583-
* Gets the setter action for the giving field on-update.
583+
* Gets the setter action for the given field on-update.
584584
*
585585
* @param array $fields
586586
* @param string $view
@@ -602,7 +602,7 @@ protected function getOnUpdateAction(array $fields)
602602
}
603603

604604
/**
605-
* Gets the relation accessor for the giving foreign renationship.
605+
* Gets the relation accessor for the given foreign renationship.
606606
*
607607
* @param CrestApps\CodeGenerator\Models\ForeignRelationship $collection
608608
*
@@ -767,7 +767,7 @@ protected function getWithRelationFor(array $fields, $view)
767767
}
768768

769769
/**
770-
* Converts giving array of relation name to a with() statements.
770+
* Converts given array of relation name to a with() statements.
771771
*
772772
* @param array $variables
773773
*
@@ -783,7 +783,7 @@ protected function getWithRelationsStatement(array $relations)
783783
}
784784

785785
/**
786-
* Checks if a giving fields array conatins at least one multiple answers' field.
786+
* Checks if a given fields array conatins at least one multiple answers' field.
787787
*
788788
* @param array
789789
*
@@ -980,7 +980,7 @@ protected function replacePaginationNumber(&$stub, $total)
980980
}
981981

982982
/**
983-
* Replaces relationCollections for the giving stub.
983+
* Replaces relationCollections for the given stub.
984984
*
985985
* @param $stub
986986
* @param $collections
@@ -1117,7 +1117,7 @@ protected function replaceViewVariablesForShow(&$stub, $variables)
11171117
}
11181118

11191119
/**
1120-
* Replaces withRelationsForIndex for the giving stub.
1120+
* Replaces withRelationsForIndex for the given stub.
11211121
*
11221122
* @param $stub
11231123
* @param $relations
@@ -1130,7 +1130,7 @@ protected function replaceWithRelationsForIndex(&$stub, $relations)
11301130
}
11311131

11321132
/**
1133-
* Replaces withRelationsForShow for the giving stub.
1133+
* Replaces withRelationsForShow for the given stub.
11341134
*
11351135
* @param $stub
11361136
* @param $relations

src/Commands/CreateFormViewCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CreateFormViewCommand extends ViewsCommandBase
2727
*
2828
* @var string
2929
*/
30-
protected $description = 'Create a from-view for the model.';
30+
protected $description = 'Create a form-view for the model.';
3131

3232
/**
3333
* Gets the name of the stub to process.
@@ -65,7 +65,7 @@ protected function handleCreateView()
6565
}
6666

6767
/**
68-
* Replaces the form field's html code in a giving stub.
68+
* Replaces the form field's html code in a given stub.
6969
*
7070
* @param string $stub
7171
* @param string $fields

src/Commands/CreateIndexViewCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected function handleCreateView()
6565
}
6666

6767
/**
68-
* Replaces the column headers in a giving stub.
68+
* Replaces the column headers in a given stub.
6969
*
7070
* @param string $stub
7171
* @param string $header
@@ -78,7 +78,7 @@ protected function replaceHeaderCells(&$stub, $header)
7878
}
7979

8080
/**
81-
* Replaces the column cells in a giving stub.
81+
* Replaces the column cells in a given stub.
8282
*
8383
* @param string $stub
8484
* @param string $body

src/Commands/CreateLanguageCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected function appendMessageToFile($fileFullname, $messages)
176176
}
177177

178178
/**
179-
* Gets the index on where to append messages to of a giving stub.
179+
* Gets the index on where to append messages to of a given stub.
180180
*
181181
* @param string $stub
182182
*
@@ -190,7 +190,7 @@ protected function getCursorPosition($stub)
190190
}
191191

192192
/**
193-
* Creates a new language file with with a giving messages.
193+
* Creates a new language file with with a given messages.
194194
*
195195
* @param string $fileFullname
196196
* @param string $messages
@@ -208,7 +208,7 @@ protected function createMessageToFile($fileFullname, $messages, $language)
208208
}
209209

210210
/**
211-
* Gets the full path of a giving language
211+
* Gets the full path of a given language
212212
*
213213
* @param string $language
214214
*

0 commit comments

Comments
 (0)