Skip to content

Commit

Permalink
Merge pull request #71 from cakephp/master-additions
Browse files Browse the repository at this point in the history
Add more changes.
  • Loading branch information
markstory committed Jan 7, 2015
2 parents cacab10 + 6410f90 commit 9a3c630
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/Shell/Task/MethodNamesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ protected function _process($path) {
'#\$this->Html->webroot\(#',
'$this->Url->webroot(',
],
[
'Replace $this->Session->flash() with $this->Flash->render()',
'#\$this->Session->flash\(#',
'$this->Flash->render(',
]
];

$otherPatterns = [
Expand Down
36 changes: 28 additions & 8 deletions src/Shell/Task/MethodSignaturesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,36 @@ protected function _process($path) {
'#\bfunction beforeFilter\(\)#i',
'function beforeFilter(Event $event)',
],
[
'parent::beforeFilter(Event $event) call',
'#\bparent::beforeFilter\(\)#i',
'parent::beforeFilter($event)',
],
[
'beforeRender(Event $event) callback',
'#\bfunction beforeRender\(\)#i',
'function beforeRender(Event $event)',
],
[
'parent::beforeRender(Event $event) call',
'#\bparent::beforeRender\(\)#i',
'parent::beforeRender($event)',
],
[
'afterFilter(Event $event) callback',
'#\bfunction afterFilter\(\)#i',
'function afterFilter(Event $event)',
],
[
'parent::afterFilter(Event $event) call',
'#\bparent::afterFilter\(\)#i',
'parent::afterFilter($event)',
],
[
'constructClasses() method',
'#\bfunction constructClasses\(\)#i',
'function initialize()',
],
];
$componentPatterns = [
[
Expand Down Expand Up @@ -113,9 +133,9 @@ protected function _process($path) {
];
$modelPatterns = [
[
'beforeValidate(Event $event, Entity $entity, ArrayObject $options) callback',
'beforeRules(Event $event, Entity $entity, ArrayObject $options) callback',
'#\bfunction beforeValidate\(array $options\s*=\s*array\(\)\)#i',
'function beforeValidate(Event $event, Entity $entity, ArrayObject $options)',
'function beforeRules(Event $event, Entity $entity, ArrayObject $options)',
],
[
'beforeSave(Event $event, Entity $entity, ArrayObject $options) callback',
Expand All @@ -128,9 +148,9 @@ protected function _process($path) {
'function beforeDelete(Event $event, Entity $entity, ArrayObject $options)',
],
[
'afterValidate(Event $event, Entity $entity, ArrayObject $options) callback',
'afterRules(Event $event, Entity $entity, ArrayObject $options) callback',
'#\bfunction afterValidate\(\)#i',
'function afterValidate(Event $event, Entity $entity, ArrayObject $options)',
'function afterRules(Event $event, Entity $entity, ArrayObject $options)',
],
[
'afterSave(Event $event, Entity $entity, ArrayObject $options) callback',
Expand All @@ -145,9 +165,9 @@ protected function _process($path) {
];
$behaviorPatterns = [
[
'beforeValidate(Event $event, Entity $entity, ArrayObject $options) callback',
'beforeRules(Event $event, Entity $entity, ArrayObject $options) callback',
'#\bfunction beforeValidate\(Model $Model,\s*$options\s*=\s*array\(\)\)#i',
'function beforeValidate(Event $event, Entity $entity, ArrayObject $options)',
'function beforeRules(Event $event, Entity $entity, ArrayObject $options)',
],
[
'beforeSave(Event $event, Entity $entity, ArrayObject $options) callback',
Expand All @@ -160,9 +180,9 @@ protected function _process($path) {
'function beforeDelete(Event $event, Entity $entity, ArrayObject $options)',
],
[
'afterValidate(Event $event, Entity $entity, ArrayObject $options) callback',
'afterRules(Event $event, Entity $entity, ArrayObject $options) callback',
'#\bfunction afterValidate\(Model $Model\)#i',
'function afterValidate(Event $event, Entity $entity, ArrayObject $options)',
'function afterRules(Event $event, Entity $entity, ArrayObject $options)',
],
[
'afterSave(Event $event, Entity $entity, ArrayObject $options) callback',
Expand Down

0 comments on commit 9a3c630

Please sign in to comment.