mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-19 07:59:54 +00:00
code standards
This commit is contained in:
parent
8e38f666b7
commit
f0fa6c7875
1 changed files with 13 additions and 5 deletions
|
@ -661,7 +661,8 @@ class ModelTask extends BakeTask {
|
|||
$this->out(__d('cake_console', 'What is the association type?'));
|
||||
$assocType = intval($this->inOptions($assocs, __d('cake_console', 'Enter a number')));
|
||||
|
||||
$this->out(__d('cake_console', "For the following options be very careful to match your setup exactly.\nAny spelling mistakes will cause errors."));
|
||||
$this->out(__d('cake_console', "For the following options be very careful to match your setup exactly.\n" .
|
||||
"Any spelling mistakes will cause errors."));
|
||||
$this->hr();
|
||||
|
||||
$alias = $this->in(__d('cake_console', 'What is the alias for this association?'));
|
||||
|
@ -755,10 +756,15 @@ class ModelTask extends BakeTask {
|
|||
'useTable' => null, 'useDbConfig' => 'default', 'displayField' => null);
|
||||
$data = array_merge($defaults, $data);
|
||||
|
||||
$pluginPath = '';
|
||||
if ($this->plugin) {
|
||||
$pluginPath = $this->plugin . '.';
|
||||
}
|
||||
|
||||
$this->Template->set($data);
|
||||
$this->Template->set(array(
|
||||
'plugin' => $this->plugin,
|
||||
'pluginPath' => empty($this->plugin) ? '' : $this->plugin . '.'
|
||||
'pluginPath' => $pluginPath
|
||||
));
|
||||
$out = $this->Template->generate('classes', 'model');
|
||||
|
||||
|
@ -876,7 +882,8 @@ class ModelTask extends BakeTask {
|
|||
$enteredModel = '';
|
||||
|
||||
while ($enteredModel == '') {
|
||||
$enteredModel = $this->in(__d('cake_console', "Enter a number from the list above,\ntype in the name of another model, or 'q' to exit"), null, 'q');
|
||||
$enteredModel = $this->in(__d('cake_console', "Enter a number from the list above,\n" .
|
||||
"type in the name of another model, or 'q' to exit"), null, 'q');
|
||||
|
||||
if ($enteredModel === 'q') {
|
||||
$this->out(__d('cake_console', 'Exit'));
|
||||
|
@ -884,7 +891,8 @@ class ModelTask extends BakeTask {
|
|||
}
|
||||
|
||||
if ($enteredModel == '' || intval($enteredModel) > count($this->_modelNames)) {
|
||||
$this->err(__d('cake_console', "The model name you supplied was empty,\nor the number you selected was not an option. Please try again."));
|
||||
$this->err(__d('cake_console', "The model name you supplied was empty,\n" .
|
||||
"or the number you selected was not an option. Please try again."));
|
||||
$enteredModel = '';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue