@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Start the appForm Builder for this class |
63 | 63 | * @param string $type the class type of the object required |
64 | 64 | */ |
65 | - public function actionEdit($type=null) |
|
65 | + public function actionEdit($type = null) |
|
66 | 66 | { |
67 | 67 | if (!$this->canDevelop()) |
68 | 68 | throw new \HttpException(403, 'This operation is not permitted here'); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $grid = new \neon\core\grid\PhoebeGrid([ |
123 | 123 | 'phoebeType'=>$this->phoebeType, |
124 | 124 | 'classType'=>$type, |
125 | - 'additionalColumns' => ['data','deleted'] |
|
125 | + 'additionalColumns' => ['data', 'deleted'] |
|
126 | 126 | ]); |
127 | 127 | return $this->render('list', [ |
128 | 128 | 'grid' => $grid, |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @param string $type the applicationForm class type the object belongs to |
138 | 138 | * @param string $id the Object id |
139 | 139 | */ |
140 | - public function actionDeleteObject($type, $id, $redirect=true) |
|
140 | + public function actionDeleteObject($type, $id, $redirect = true) |
|
141 | 141 | { |
142 | 142 | $this->deleteObject($id); |
143 | 143 | if ($redirect) |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * @param type $classType |
151 | 151 | * @return type |
152 | 152 | */ |
153 | - public function actionValidateForm($classType, $name=null) |
|
153 | + public function actionValidateForm($classType, $name = null) |
|
154 | 154 | { |
155 | 155 | return PhoebeValidator::validateForm('applicationForm', $classType, $name); |
156 | 156 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // temporary hack to sort out uuids being passed in rather than |
42 | 42 | // a human readable definition. |
43 | 43 | if ($this->is_uuid($class)) |
44 | - $class=str_replace(['-','_'], ['a','Z'],Hash::uuid2uuid64($class)); |
|
44 | + $class = str_replace(['-', '_'], ['a', 'Z'], Hash::uuid2uuid64($class)); |
|
45 | 45 | else |
46 | 46 | $class = $phoebe->canonicaliseRef($class); |
47 | 47 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | // close the migration |
66 | 66 | $this->endMigration(); |
67 | 67 | |
68 | - $phoebeClass = $phoebe->getClass($class); |
|
68 | + $phoebeClass = $phoebe->getClass($class); |
|
69 | 69 | if ($phoebeClass == null) { |
70 | 70 | $phoebeClass = ['error' => "No class exists with a type of '$class'"]; |
71 | 71 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | private function is_uuid($str) |
83 | 83 | { |
84 | - return (strlen($str)==36 && substr_count($str, '-')==4); |
|
84 | + return (strlen($str) == 36 && substr_count($str, '-') == 4); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -52,7 +52,7 @@ |
||
52 | 52 | * @param string $type the phoebe class type |
53 | 53 | * @return \neon\core\form\Form |
54 | 54 | */ |
55 | - protected function getPhoebeForm($type, &$isNewForm=null, $addExtras=true, $builder=false) |
|
55 | + protected function getPhoebeForm($type, &$isNewForm = null, $addExtras = true, $builder = false) |
|
56 | 56 | { |
57 | 57 | $form = null; |
58 | 58 | $isNewForm = false; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | */ |
8 | 8 | class PhoebeValidator |
9 | 9 | { |
10 | - public static function validateForm($phoebeType, $classType, $name=null) |
|
10 | + public static function validateForm($phoebeType, $classType, $name = null) |
|
11 | 11 | { |
12 | 12 | // get hold of the form |
13 | 13 | $form = neon('phoebe')->getForm($phoebeType, $classType, []); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | class FormBuilderAsset extends \yii\web\AssetBundle |
14 | 14 | { |
15 | - public $sourcePath = __DIR__ . '/publish'; |
|
15 | + public $sourcePath = __DIR__.'/publish'; |
|
16 | 16 | |
17 | 17 | public $js = [ |
18 | 18 | 'store.js', |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | class AppFormBuilderAsset extends \yii\web\AssetBundle |
15 | 15 | { |
16 | - public $sourcePath = __DIR__ . '/publish'; |
|
16 | + public $sourcePath = __DIR__.'/publish'; |
|
17 | 17 | |
18 | 18 | public $js = [ |
19 | 19 | 'manifest.js', |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * @inheritdoc |
93 | 93 | */ |
94 | - public function getDataMap($key, $query='', $filters=[], $fields=[], $start=0, $length=100) |
|
94 | + public function getDataMap($key, $query = '', $filters = [], $fields = [], $start = 0, $length = 100) |
|
95 | 95 | { |
96 | 96 | // convert generic form builder filters to phoebe class ones |
97 | 97 | $filters = Arr::replaceKeys($filters, ['uuid'=> 'class_type']); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * that you want to display and in what order |
174 | 174 | * @return array |
175 | 175 | */ |
176 | - public function getFormDefinition($phoebeType, $classType, array $fields=[]) |
|
176 | + public function getFormDefinition($phoebeType, $classType, array $fields = []) |
|
177 | 177 | { |
178 | 178 | $cacheKey = md5(serialize(func_get_args())); |
179 | 179 | return neon()->cacheArray->getOrSet($cacheKey, function() use ($classType, $phoebeType, $fields) { |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | * @return bool - returns true if saved correctly or the set of errors if the |
427 | 427 | * form couldn't validate |
428 | 428 | */ |
429 | - public function saveForm($phoebeType, $classType, $form=null, $formName=null, $metaInfo=null, &$uuid=null, &$changeLogUuids=[]) |
|
429 | + public function saveForm($phoebeType, $classType, $form = null, $formName = null, $metaInfo = null, &$uuid = null, &$changeLogUuids = []) |
|
430 | 430 | { |
431 | 431 | $changeLogUuids = []; |
432 | 432 | if (!$form) { |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | $itemKey = substr($key, strlen($this->formMetaDataSourceString)); |
510 | 510 | if (empty($meta['dataSources'][$itemKey])) |
511 | 511 | $meta['dataSources'][$itemKey] = $v; |
512 | - } else if ($key==$this->formMetaReturnUrlString && empty($meta['returnUrl'])) { |
|
512 | + } else if ($key == $this->formMetaReturnUrlString && empty($meta['returnUrl'])) { |
|
513 | 513 | $meta['returnUrl'] = $v; |
514 | 514 | } |
515 | 515 | } |
@@ -80,5 +80,5 @@ |
||
80 | 80 | * @param string $role |
81 | 81 | * @return null | string the url if found |
82 | 82 | */ |
83 | - public function getHomeUrl($role=null); |
|
83 | + public function getHomeUrl($role = null); |
|
84 | 84 | } |
85 | 85 | \ No newline at end of file |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @return array users as |
38 | 38 | * [['uuid'=>'username']...] |
39 | 39 | */ |
40 | - public function listUsers(Iterator &$iterator=null); |
|
40 | + public function listUsers(Iterator &$iterator = null); |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Find a set of users based on a partial search string |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @return array users as |
48 | 48 | * [['uuid'=>'username']...] |
49 | 49 | */ |
50 | - public function searchUsers($search, Iterator &$iterator=null); |
|
50 | + public function searchUsers($search, Iterator &$iterator = null); |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * Create a new User |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * calling this must also be a superuser |
60 | 60 | * @return string - the users uuid |
61 | 61 | */ |
62 | - public function addUser($username, $email, $password, $roles=[], $superuser=false); |
|
62 | + public function addUser($username, $email, $password, $roles = [], $superuser = false); |
|
63 | 63 | |
64 | 64 | /** |
65 | 65 | * Get hold of an User given the user uuid |