Skip to content
This repository
Browse code

Code standards fixes

  • Loading branch information...
commit f10c669813f4b4e2fd1cdca813f7934f4a4dfdf2 1 parent 478461d
Kyle Robinson Young shama authored
2  lib/Cake/Console/Command/ServerShell.php
@@ -24,10 +24,12 @@
24 24 * @package Cake.Console.Command
25 25 */
26 26 class ServerShell extends AppShell {
  27 +
27 28 /**
28 29 * Default ServerHost
29 30 */
30 31 const DEFAULT_HOST = 'localhost';
  32 +
31 33 /**
32 34 * Default ListenPort
33 35 */
1  lib/Cake/Model/Permission.php
@@ -146,7 +146,6 @@ public function check($aro, $aco, $action = "*") {
146 146 return false;
147 147 case 0:
148 148 continue;
149   - break;
150 149 case 1:
151 150 return true;
152 151 }
20 lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
@@ -66,15 +66,12 @@ public function beforeFind(Model $model, $query) {
66 66 switch ($settings['beforeFind']) {
67 67 case 'on':
68 68 return false;
69   - break;
70 69 case 'test':
71 70 return null;
72   - break;
73 71 case 'modify':
74 72 $query['fields'] = array($model->alias . '.id', $model->alias . '.name', $model->alias . '.mytime');
75 73 $query['recursive'] = -1;
76 74 return $query;
77   - break;
78 75 }
79 76 }
80 77
@@ -94,16 +91,12 @@ public function afterFind(Model $model, $results, $primary) {
94 91 switch ($settings['afterFind']) {
95 92 case 'on':
96 93 return array();
97   - break;
98 94 case 'test':
99 95 return true;
100   - break;
101 96 case 'test2':
102 97 return null;
103   - break;
104 98 case 'modify':
105 99 return Hash::extract($results, "{n}.{$model->alias}");
106   - break;
107 100 }
108 101 }
109 102
@@ -121,14 +114,11 @@ public function beforeSave(Model $model) {
121 114 switch ($settings['beforeSave']) {
122 115 case 'on':
123 116 return false;
124   - break;
125 117 case 'test':
126 118 return true;
127   - break;
128 119 case 'modify':
129 120 $model->data[$model->alias]['name'] .= ' modified before';
130 121 return true;
131   - break;
132 122 }
133 123 }
134 124
@@ -157,7 +147,6 @@ public function afterSave(Model $model, $created) {
157 147 break;
158 148 case 'test2':
159 149 return false;
160   - break;
161 150 case 'modify':
162 151 $model->data[$model->alias]['name'] .= ' ' . $string;
163 152 break;
@@ -179,18 +168,14 @@ public function beforeValidate(Model $model) {
179 168 case 'on':
180 169 $model->invalidate('name');
181 170 return true;
182   - break;
183 171 case 'test':
184 172 return null;
185   - break;
186 173 case 'whitelist':
187 174 $this->_addToWhitelist($model, array('name'));
188 175 return true;
189   - break;
190 176 case 'stop':
191 177 $model->invalidate('name');
192 178 return false;
193   - break;
194 179 }
195 180 }
196 181
@@ -209,11 +194,9 @@ public function afterValidate(Model $model) {
209 194 switch ($settings['afterValidate']) {
210 195 case 'on':
211 196 return false;
212   - break;
213 197 case 'test':
214 198 $model->data = array('foo');
215 199 return true;
216   - break;
217 200 }
218 201 }
219 202
@@ -232,17 +215,14 @@ public function beforeDelete(Model $model, $cascade = true) {
232 215 switch ($settings['beforeDelete']) {
233 216 case 'on':
234 217 return false;
235   - break;
236 218 case 'test':
237 219 return null;
238   - break;
239 220 case 'test2':
240 221 echo 'beforeDelete success';
241 222 if ($cascade) {
242 223 echo ' (cascading) ';
243 224 }
244 225 return true;
245   - break;
246 226 }
247 227 }
248 228

0 comments on commit f10c669

Please sign in to comment.
Something went wrong with that request. Please try again.