@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function getKey() |
61 | 61 | { |
62 | - if(empty($this->key)) |
|
62 | + if (empty($this->key)) |
|
63 | 63 | throw new TException('The Key property must be specified.'); |
64 | 64 | return $this->key; |
65 | 65 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public function getParameter() |
108 | 108 | { |
109 | 109 | $value = $this->getValue(); |
110 | - if(strlen($value) > 0) |
|
110 | + if (strlen($value) > 0) |
|
111 | 111 | return $value; |
112 | 112 | $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
113 | 113 | $this->renderControl($htmlWriter); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | */ |
80 | 80 | public function raiseCallbackEvent($param) |
81 | 81 | { |
82 | - if($this->getActiveControl()->canCauseValidation()) |
|
82 | + if ($this->getActiveControl()->canCauseValidation()) |
|
83 | 83 | $this->getPage()->validate($this->getActiveControl()->getValidationGroup()); |
84 | 84 | $this->onCallback($param); |
85 | 85 | } |
@@ -80,7 +80,7 @@ |
||
80 | 80 | public function setDecayRate($value) |
81 | 81 | { |
82 | 82 | $decay = TPropertyValue::ensureFloat($value); |
83 | - if($decay < 0) |
|
83 | + if ($decay < 0) |
|
84 | 84 | throw new TConfigurationException('callback_decay_be_not_negative', $this->getID()); |
85 | 85 | $this->setViewState('Decay', $decay); |
86 | 86 | } |
@@ -35,9 +35,9 @@ |
||
35 | 35 | public function getPHPType() |
36 | 36 | { |
37 | 37 | $dbtype = strtolower($this->getDbType()); |
38 | - foreach(self::$types as $type => $dbtypes) |
|
38 | + foreach (self::$types as $type => $dbtypes) |
|
39 | 39 | { |
40 | - if(in_array($dbtype, $dbtypes)) |
|
40 | + if (in_array($dbtype, $dbtypes)) |
|
41 | 41 | return $type; |
42 | 42 | } |
43 | 43 | return 'string'; |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function setText($value) |
52 | 52 | { |
53 | - if(parent::getText() === $value) |
|
53 | + if (parent::getText() === $value) |
|
54 | 54 | return; |
55 | 55 | |
56 | 56 | parent::setText($value); |
57 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
57 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
58 | 58 | $this->getPage()->getCallbackClient()->update($this, $value); |
59 | 59 | } |
60 | 60 | |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function setImageUrl($value) |
66 | 66 | { |
67 | - if(parent::getImageUrl() === $value) |
|
67 | + if (parent::getImageUrl() === $value) |
|
68 | 68 | return; |
69 | 69 | |
70 | 70 | parent::setImageUrl($value); |
71 | - if($this->getActiveControl()->canUpdateClientSide() && $value !== '') |
|
71 | + if ($this->getActiveControl()->canUpdateClientSide() && $value !== '') |
|
72 | 72 | { |
73 | 73 | $textWriter = new TTextWriter; |
74 | 74 | $renderer = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $textWriter); |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function setNavigateUrl($value) |
85 | 85 | { |
86 | - if(parent::getNavigateUrl() === $value) |
|
86 | + if (parent::getNavigateUrl() === $value) |
|
87 | 87 | return; |
88 | 88 | |
89 | 89 | parent::setNavigateUrl($value); |
90 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
90 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
91 | 91 | { |
92 | 92 | //replace & with & and urldecode the url (setting the href using javascript is literal) |
93 | 93 | $url = urldecode(str_replace('&', '&', $value)); |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function setTarget($value) |
103 | 103 | { |
104 | - if(parent::getTarget() === $value) |
|
104 | + if (parent::getTarget() === $value) |
|
105 | 105 | return; |
106 | 106 | |
107 | 107 | parent::setTarget($value); |
108 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
108 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
109 | 109 | $this->getPage()->getCallbackClient()->setAttribute($this, 'target', $value); |
110 | 110 | } |
111 | 111 | } |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function setAlternateText($value) |
50 | 50 | { |
51 | - if(parent::getAlternateText() === $value) |
|
51 | + if (parent::getAlternateText() === $value) |
|
52 | 52 | return; |
53 | 53 | |
54 | 54 | parent::setAlternateText($value); |
55 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
55 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
56 | 56 | $this->getPage()->getCallbackClient()->setAttribute($this, 'alt', $value); |
57 | 57 | } |
58 | 58 | |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function setImageAlign($value) |
67 | 67 | { |
68 | - if(parent::getImageAlign() === $value) |
|
68 | + if (parent::getImageAlign() === $value) |
|
69 | 69 | return; |
70 | 70 | |
71 | 71 | parent::setImageAlign($value); |
72 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
72 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
73 | 73 | $this->getPage()->getCallbackClient()->setAttribute($this, 'align', $value); |
74 | 74 | } |
75 | 75 | |
@@ -78,11 +78,11 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function setImageUrl($value) |
80 | 80 | { |
81 | - if(parent::getImageUrl() === $value) |
|
81 | + if (parent::getImageUrl() === $value) |
|
82 | 82 | return; |
83 | 83 | |
84 | 84 | parent::setImageUrl($value); |
85 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
85 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
86 | 86 | $this->getPage()->getCallbackClient()->setAttribute($this, 'src', $value); |
87 | 87 | } |
88 | 88 | |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function setDescriptionUrl($value) |
93 | 93 | { |
94 | - if(parent::getDescriptionUrl() === $value) |
|
94 | + if (parent::getDescriptionUrl() === $value) |
|
95 | 95 | return; |
96 | 96 | |
97 | 97 | parent::setDescriptionUrl($value); |
98 | - if($this->getActiveControl()->canUpdateClientSide()) |
|
98 | + if ($this->getActiveControl()->canUpdateClientSide()) |
|
99 | 99 | $this->getPage()->getCallbackClient()->setAttribute($this, 'longdesc', $value); |
100 | 100 | } |
101 | 101 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function getPage() |
50 | 50 | { |
51 | - return $this->_control?$this->_control->getPage():null; |
|
51 | + return $this->_control ? $this->_control->getPage() : null; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -26,6 +26,6 @@ |
||
26 | 26 | { |
27 | 27 | public function toJavaScriptLiteral() |
28 | 28 | { |
29 | - return TJavaScript::jsonEncode((string)$this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); |
|
29 | + return TJavaScript::jsonEncode((string) $this->_s, JSON_HEX_QUOT | JSON_HEX_APOS | JSON_HEX_TAG); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function getCoordinates() |
40 | 40 | { |
41 | - return $this->getLeft() . ',' . $this->getTop() . ',' . $this->getRight() . ',' . $this->getBottom(); |
|
41 | + return $this->getLeft().','.$this->getTop().','.$this->getRight().','.$this->getBottom(); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |