Skip to content

Commit

Permalink
* ActiveRecord::getScenarioCommand() - changed command generation lo…
Browse files Browse the repository at this point in the history
…gic, updated PHP
  • Loading branch information
SilverFire committed Oct 29, 2015
1 parent b2db4a9 commit c197d5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function getScenarioCommand($default = '', $bulk = false)
} elseif (is_array($command)) {
$result = $command;
} else {
$result = ucfirst($command);
$result = Inflector::id2camel($command);
}
} else {
$result = Inflector::id2camel($this->scenario);
Expand All @@ -399,7 +399,7 @@ public function getScenarioCommand($default = '', $bulk = false)
if (is_array($result)) {
return implode('', $result);
} else {
return static::modelName() . ($bulk ? 's' : '') . $result;
return static::type() . ($bulk ? 's' : '') . $result;
}
}

Expand All @@ -410,9 +410,9 @@ public function getScenarioCommand($default = '', $bulk = false)
*
* ```
* [
* 'update-name' => 'set-name',
* 'update-related-name' => [Action::formName(), 'SetName'],
* 'update-self-case-sensetive' => [null, 'SomeSENSETIVE']
* 'update-name' => 'set-name', /// ModuleSetName
* 'update-related-name' => [Action::formName(), 'SetName'], /// ActionSetName
* 'update-self-case-sensetive' => [null, 'SomeSENSETIVE'] /// ModuleSomeSENSETIVE
* ]
* ~~
*
Expand Down

0 comments on commit c197d5b

Please sign in to comment.