@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected function getShapeHtml() |
| 30 | 30 | { |
| 31 | - $path = "M{$this->size} {$this->size} " . number_format($this->size / 2, 1) . ' ' . number_format($this->size / 6, 1) . " L0 {$this->size} Z"; |
|
| 31 | + $path = "M{$this->size} {$this->size} ".number_format($this->size / 2, 1).' '.number_format($this->size / 6, 1)." L0 {$this->size} Z"; |
|
| 32 | 32 | return "<svg height='{$this->size}' width='{$this->size}'> |
| 33 | 33 | <path d='{$path}' fill='{$this->color}'/> |
| 34 | 34 | </svg>"; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function getSource() |
| 48 | 48 | { |
| 49 | 49 | $App = $this->App(); |
| 50 | - return $App->getRecordByRef($this->sourceClass . ':' . $this->sourceId); |
|
| 50 | + return $App->getRecordByRef($this->sourceClass.':'.$this->sourceId); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | public function getTarget() |
| 57 | 57 | { |
| 58 | 58 | $App = $this->App(); |
| 59 | - return $App->getRecordByRef($this->targetClass . ':' . $this->targetId); |
|
| 59 | + return $App->getRecordByRef($this->targetClass.':'.$this->targetId); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
@@ -26,10 +26,10 @@ |
||
| 26 | 26 | * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL) |
| 27 | 27 | * @copyright Copyright (c) 2023 by SI-4YOU ({@link https://www.siforyou.com})
|
| 28 | 28 | */ |
| 29 | -define('APP_PHP_PATH', dirname(__FILE__) . '/');
|
|
| 30 | -define('APP_SET_PATH', dirname(__FILE__) . '/');
|
|
| 31 | -define('APP_UI_PATH', dirname(__FILE__) . '/ui/');
|
|
| 32 | -define('APP_WIDGETS_PATH', APP_UI_PATH . 'widgets/');
|
|
| 33 | -define('APP_CTRL_PATH', dirname(__FILE__) . '/');
|
|
| 34 | -define('APP_PORTLET_PATH', APP_PHP_PATH . 'Portlet/');
|
|
| 29 | +define('APP_PHP_PATH', dirname(__FILE__).'/');
|
|
| 30 | +define('APP_SET_PATH', dirname(__FILE__).'/');
|
|
| 31 | +define('APP_UI_PATH', dirname(__FILE__).'/ui/');
|
|
| 32 | +define('APP_WIDGETS_PATH', APP_UI_PATH.'widgets/');
|
|
| 33 | +define('APP_CTRL_PATH', dirname(__FILE__).'/');
|
|
| 34 | +define('APP_PORTLET_PATH', APP_PHP_PATH.'Portlet/');
|
|
| 35 | 35 | define('APP_SSE_DEFAULT_REFRESH_FREQUENCY', 5);
|
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $sourceClass = (new \ReflectionClass($sourceClass))->getShortName(); |
| 128 | 128 | } |
| 129 | 129 | if (!$this->sourceId instanceof $sourceClass) { |
| 130 | - $this->hasOne('sourceId', $sourceClass . 'Set'); |
|
| 130 | + $this->hasOne('sourceId', $sourceClass.'Set'); |
|
| 131 | 131 | $this->join('sourceId'); |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $targetClass = (new \ReflectionClass($targetClass))->getShortName(); |
| 142 | 142 | } |
| 143 | 143 | if (!$this->targetId instanceof $targetClass) { |
| 144 | - $this->hasOne('targetId', $targetClass . 'Set'); |
|
| 144 | + $this->hasOne('targetId', $targetClass.'Set'); |
|
| 145 | 145 | $this->join('targetId'); |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | if ($deleteTarget) { |
| 344 | 344 | foreach ($set->select($criteria) as $link) { |
| 345 | 345 | |
| 346 | - $className = $link->targetClass . 'Set'; |
|
| 346 | + $className = $link->targetClass.'Set'; |
|
| 347 | 347 | |
| 348 | 348 | // remove prefix |
| 349 | 349 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | if (!empty($reloadSelectors)) {
|
| 115 | - $sseData .= '"reloadSelector":' . bab_json_encode($reloadSelectors); |
|
| 115 | + $sseData .= '"reloadSelector":'.bab_json_encode($reloadSelectors); |
|
| 116 | 116 | $hasData = true; |
| 117 | 117 | } |
| 118 | 118 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | if ($hasData) {
|
| 130 | 130 | $sseData .= ', '; |
| 131 | 131 | } |
| 132 | - $sseData .= '"browserNotifications":' . bab_json_encode($browserNotifications); |
|
| 132 | + $sseData .= '"browserNotifications":'.bab_json_encode($browserNotifications); |
|
| 133 | 133 | $hasData = true; |
| 134 | 134 | } |
| 135 | 135 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | if (!isset($spacerPos) || empty($spacerPos)) { |
| 251 | 251 | $spacerPos = 0; |
| 252 | 252 | } |
| 253 | - while (isset($fields[$updatedFieldName . $spacerPos])) { |
|
| 253 | + while (isset($fields[$updatedFieldName.$spacerPos])) { |
|
| 254 | 254 | $spacerPos++; |
| 255 | 255 | } |
| 256 | 256 | $updatedFieldName .= $spacerPos; |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | } |
| 260 | 260 | if (!isset($fields[$updatedFieldName])) { |
| 261 | 261 | if ($isFieldsGroup) { |
| 262 | - while (isset($fields[$updatedFieldName . $groupPos])) { |
|
| 262 | + while (isset($fields[$updatedFieldName.$groupPos])) { |
|
| 263 | 263 | $groupPos++; |
| 264 | 264 | } |
| 265 | 265 | $updatedFieldName .= $groupPos; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | } |
| 409 | 409 | if ($updatedFieldName === '_subSection') { |
| 410 | 410 | $groupPos = 0; |
| 411 | - while (isset($groupFields[$updatedFieldName . $groupPos])) { |
|
| 411 | + while (isset($groupFields[$updatedFieldName.$groupPos])) { |
|
| 412 | 412 | $groupPos++; |
| 413 | 413 | } |
| 414 | 414 | $updatedFieldName .= $groupPos; |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | $subSectionFields = isset($fields[$fieldGroupName]['fields'][$subSectionName]['fields']) ? $fields[$fieldGroupName]['fields'][$subSectionName]['fields'] : array(); |
| 461 | 461 | if ($updatedFieldName === '_fieldsGroup') { |
| 462 | 462 | $groupPos = 0; |
| 463 | - while (isset($subSectionFields[$updatedFieldName . $groupPos])) { |
|
| 463 | + while (isset($subSectionFields[$updatedFieldName.$groupPos])) { |
|
| 464 | 464 | $groupPos++; |
| 465 | 465 | } |
| 466 | 466 | $updatedFieldName .= $groupPos; |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | $criteria = $field->$op($value); |
| 519 | 519 | } else { |
| 520 | 520 | foreach ($value as $foreignClassName => $foreignValues) { |
| 521 | - $foreignClassName = str_replace($App->classPrefix, '', $foreignClassName) . 'Set'; |
|
| 521 | + $foreignClassName = str_replace($App->classPrefix, '', $foreignClassName).'Set'; |
|
| 522 | 522 | $foreignSet = $App->$foreignClassName(); |
| 523 | 523 | $foreignField = ''; |
| 524 | 524 | $foreignCondition = ''; |
@@ -42,7 +42,6 @@ |
||
| 42 | 42 | /** |
| 43 | 43 | * @method FuncApp App() |
| 44 | 44 | * @method AppCustomFieldSet getParentSet() |
| 45 | - |
|
| 46 | 45 | * @property string $name |
| 47 | 46 | * @property string $fieldname |
| 48 | 47 | * @property string $description |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | break; |
| 84 | 84 | |
| 85 | 85 | default: |
| 86 | - $function = 'Capwelton\LibOrm\ORM_' . $this->fieldtype . 'Field'; |
|
| 86 | + $function = 'Capwelton\LibOrm\ORM_'.$this->fieldtype.'Field'; |
|
| 87 | 87 | $field = $function($this->fieldname); |
| 88 | 88 | break; |
| 89 | 89 | } |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | throw new AppSaveException($this->App()->translate('The name is mandatory')); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - return '_' . $name; |
|
| 132 | + return '_'.$name; |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
@@ -52,7 +52,6 @@ |
||
| 52 | 52 | * @method AppCustomField request(mixed $criteria) |
| 53 | 53 | * @method AppCustomField[]|ORMMySqlIterator select(ORMCriteria $criteria) |
| 54 | 54 | * @method AppCustomField newRecord() |
| 55 | - |
|
| 56 | 55 | * @property ORMStringField $name |
| 57 | 56 | * @property ORMStringField $fieldname |
| 58 | 57 | * @property ORMTextField $description |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | $App = $this->App(); |
| 56 | 56 | $sseSet = $App->SSESet(); |
| 57 | - $sseSet->newReloadSelector('.' . self::NOTIFICATION_PORTLET_CLASS); |
|
| 57 | + $sseSet->newReloadSelector('.'.self::NOTIFICATION_PORTLET_CLASS); |
|
| 58 | 58 | $sseSet->newBrowserNotification(array( |
| 59 | 59 | 'title' => $this->title, |
| 60 | 60 | 'body' => $this->description, |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->seen = true; |
| 70 | 70 | $this->save(); |
| 71 | 71 | $sseSet = $this->App()->SSESet(); |
| 72 | - $sseSet->newReloadSelector('.' . self::NOTIFICATION_PORTLET_CLASS); |
|
| 72 | + $sseSet->newReloadSelector('.'.self::NOTIFICATION_PORTLET_CLASS); |
|
| 73 | 73 | return true; |
| 74 | 74 | } |
| 75 | 75 | } |