Skip to content

Commit 92726bb

Browse files
committed
Fix scrut bugs
1 parent 30b0965 commit 92726bb

File tree

20 files changed

+59
-57
lines changed

20 files changed

+59
-57
lines changed

Ajax/bootstrap/html/HtmlBreadcrumbs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HtmlBreadcrumbs extends HtmlNavElement {
3030
protected $absolutePaths;
3131

3232
/**
33-
* @var object<Closure> the function who generates the href elements. default : function($e){return $e->getContent()}
33+
* @var callable the function who generates the href elements. default : function($e){return $e->getContent()}
3434
*/
3535
protected $_hrefFunction;
3636

Ajax/bootstrap/html/HtmlButtongroups.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
class HtmlButtongroups extends HtmlBsDoubleElement {
1515

1616
/**
17-
* @var array[HtmlButton]
17+
* @var array
1818
*/
1919
protected $elements;
2020

@@ -128,7 +128,7 @@ public function setAlignment($value) {
128128

129129
/**
130130
* Return the element at index
131-
* @param int $index
131+
* @param int $index|string
132132
* @return HtmlButton
133133
*/
134134
public function getElement($index) {

Ajax/common/html/BaseHtml.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ protected function ctrl($name, $value, $typeCtrl) {
6666

6767

6868
protected function setMemberCtrl(&$name, $value, $typeCtrl) {
69-
if ($this->ctrl($name, $value, $typeCtrl) === true) {
70-
return $name=$value;
71-
}
69+
$this->ctrl($name, $value, $typeCtrl);
70+
$name=$value;
7271
return $this;
7372
}
7473

@@ -83,12 +82,11 @@ protected function addToMemberUnique(&$name, $value, $typeCtrl, $separator=" ")
8382

8483

8584
protected function addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ") {
86-
if ($this->ctrl($name, $value, $typeCtrl) === true) {
87-
if (\is_array($typeCtrl)) {
88-
$this->removeOldValues($name, $typeCtrl);
89-
}
90-
$name.=$separator . $value;
85+
$this->ctrl($name, $value, $typeCtrl);
86+
if (\is_array($typeCtrl)) {
87+
$this->removeOldValues($name, $typeCtrl);
9188
}
89+
$name.=$separator . $value;
9290
return $this;
9391
}
9492

Ajax/common/html/HtmlCollection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ public function setProperties($properties){
155155
/**
156156
* Sets the values of a property for each item in the collection
157157
* @param string $property
158-
* @param array $values
159-
* @return HtmlCollection
158+
* @param array|mixed $values
159+
* @return $this
160160
*/
161161
public function setPropertyValues($property,$values){
162162
$i=0;
@@ -178,8 +178,8 @@ public function setPropertyValues($property,$values){
178178
/**
179179
* Adds the values of a property for each item in the collection
180180
* @param string $property
181-
* @param array $values
182-
* @return HtmlCollection
181+
* @param array|mixed $values
182+
* @return $this
183183
*/
184184
public function addPropertyValues($property,$values){
185185
$i=0;

Ajax/common/traits/JsUtilsActionsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public function show($element='this', $speed='', $callback='', $immediatly=false
365365
*
366366
* @param string $element
367367
* @param array $options
368-
* @return void
368+
* @return string
369369
*/
370370
public function sortable($element, $options=array()) {
371371
if (count($options)>0) {

Ajax/semantic/components/validation/FieldValidation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getRules() {
4343
}
4444

4545
/**
46-
* @param string $type
46+
* @param string $type|Rule|array
4747
* @param string $prompt
4848
* @param string $value
4949
* @return Rule

Ajax/semantic/html/collections/HtmlGrid.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Ajax\semantic\html\collections;
44

5-
use Ajax\common\html\HtmlCollection;
65
use Ajax\semantic\html\content\HtmlGridRow;
76
use Ajax\semantic\html\base\constants\Wide;
87
use Ajax\semantic\html\base\constants\VerticalAlignment;
@@ -27,9 +26,7 @@ public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=
2726
$this->_implicitRows=$implicitRows;
2827
$this->_createCols=$createCols;
2928
if (isset($numCols)) {
30-
// if($this->_createCols){
3129
$this->_colSizing=false;
32-
// }
3330
$this->setWide($numCols);
3431
}
3532
if($createCols)
@@ -167,6 +164,13 @@ public function setColsCount($numCols, $toCreate=true, $width=NULL) {
167164
public function getRow($index) {
168165
return $this->getItem($index);
169166
}
167+
168+
/**
169+
* @return HtmlGridRow
170+
*/
171+
public function getItem($index){
172+
return parent::getItem($index);
173+
}
170174

171175
/**
172176
* Returns the row count

Ajax/semantic/html/collections/form/HtmlFormFields.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ public function addItem($item) {
6161
$item->setContainer($this);
6262
return $item;
6363
}
64+
65+
/**
66+
* @return HtmlFormField
67+
*/
68+
public function getItem($index){
69+
return parent::getItem($index);
70+
}
6471

6572
public function compile(JsUtils $js=NULL, &$view=NULL) {
6673
if ($this->_equalWidth) {

Ajax/semantic/html/collections/form/traits/CheckboxTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function getDataField(){
6161
/**
6262
* Check the checkbox
6363
* @param boolean $value
64-
* @return HtmlFormField
64+
* @return $this
6565
*/
6666
public function setChecked($value=true){
6767
if($value===true){

Ajax/semantic/html/collections/form/traits/FieldTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public function labeledToCorner($icon, $direction=Direction::LEFT) {
6868
}
6969

7070
/**
71-
* @param string $action
71+
* @param mixed $action
7272
* @param string $direction
7373
* @param string $icon
74-
* @param string $labeled
74+
* @param boolean $labeled
7575
* @return mixed|HtmlButton
7676
*/
7777
public function addAction($action, $direction=Direction::RIGHT, $icon=NULL, $labeled=false) {

0 commit comments

Comments
 (0)