@@ -41,24 +41,24 @@ discard block |
||
| 41 | 41 | // init dom model |
| 42 | 42 | $dom = new Dom(); |
| 43 | 43 | // draw response |
| 44 | - $table = $dom->table(function () use ($dom, $elements, $selectOptions) { |
|
| 44 | + $table = $dom->table(function() use ($dom, $elements, $selectOptions) { |
|
| 45 | 45 | $res = null; |
| 46 | 46 | // check if thead is defined |
| 47 | 47 | if (isset($elements['thead']) && Obj::isArray($elements['thead']) && count($elements['thead']) > 0 && Obj::isArray($elements['thead']['titles'])) { |
| 48 | 48 | // add thead container |
| 49 | - $res .= $dom->thead(function () use ($dom, $elements, $selectOptions) { |
|
| 50 | - return $dom->tr(function () use ($dom, $elements, $selectOptions) { |
|
| 49 | + $res .= $dom->thead(function() use ($dom, $elements, $selectOptions) { |
|
| 50 | + return $dom->tr(function() use ($dom, $elements, $selectOptions) { |
|
| 51 | 51 | $tr = null; |
| 52 | 52 | foreach ($elements['thead']['titles'] as $order => $title) { |
| 53 | 53 | $th = htmlentities($title['text']); |
| 54 | 54 | // make global checkbox for selectable columns |
| 55 | 55 | if ($selectOptions !== false && $order + 1 === $selectOptions['attachOrder']) { |
| 56 | - $th = $dom->input(function () { |
|
| 56 | + $th = $dom->input(function() { |
|
| 57 | 57 | return null; |
| 58 | 58 | }, ['type' => 'checkbox', 'name' => 'selectAll']) . ' ' . $th; |
| 59 | 59 | } |
| 60 | 60 | // build tr row collecting all th's |
| 61 | - $tr .= $dom->th(function () use ($th) { |
|
| 61 | + $tr .= $dom->th(function() use ($th) { |
|
| 62 | 62 | return $th; |
| 63 | 63 | }); |
| 64 | 64 | } |
@@ -77,14 +77,14 @@ discard block |
||
| 77 | 77 | // sort td items inside row by key increment |
| 78 | 78 | ksort($row); |
| 79 | 79 | // add data in tr container |
| 80 | - $tr .= $dom->tr(function () use ($dom, $row, $selectOptions) { |
|
| 80 | + $tr .= $dom->tr(function() use ($dom, $row, $selectOptions) { |
|
| 81 | 81 | $td = null; |
| 82 | 82 | foreach ($row as $order => $item) { |
| 83 | 83 | if (!Obj::isInt($order)) { |
| 84 | 84 | continue; |
| 85 | 85 | } |
| 86 | 86 | // collect td item |
| 87 | - $td .= $dom->td(function () use ($dom, $order, $item, $selectOptions) { |
|
| 87 | + $td .= $dom->td(function() use ($dom, $order, $item, $selectOptions) { |
|
| 88 | 88 | $text = null; |
| 89 | 89 | // make text secure based on passed options |
| 90 | 90 | if ($item['html'] === true) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | // check if selectable box is enabled and equal current order id |
| 100 | 100 | if ($selectOptions !== false && $order === $selectOptions['attachOrder']) { |
| 101 | - $text = $dom->input(function (){ |
|
| 101 | + $text = $dom->input(function() { |
|
| 102 | 102 | return null; |
| 103 | 103 | }, Arr::merge($selectOptions['input'], ['value' => $text])) . ' ' . $text; |
| 104 | 104 | } |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | // build js code for "selectAll" checkbox |
| 124 | 124 | self::buildSelectorHtml($selectOptions); |
| 125 | 125 | // return response inside "form" tag |
| 126 | - return $dom->form(function () use ($dom, $selectOptions, $table){ |
|
| 127 | - $table .= $dom->input(function () { |
|
| 126 | + return $dom->form(function() use ($dom, $selectOptions, $table){ |
|
| 127 | + $table .= $dom->input(function() { |
|
| 128 | 128 | return null; |
| 129 | 129 | }, $selectOptions['button']); |
| 130 | 130 | return $table; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | /** |
| 19 | 19 | * Construct table based on passed elements as array: properties, thead, tbody, rows, items etc |
| 20 | 20 | * @param array $elements |
| 21 | - * @return null |
|
| 21 | + * @return null|string |
|
| 22 | 22 | */ |
| 23 | 23 | public static function display($elements) |
| 24 | 24 | { |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Ffcms\Core\App; |
| 6 | 6 | use Ffcms\Core\Exception\SyntaxException; |
| 7 | 7 | use Dflydev\DotAccessData\Data as DotData; |
| 8 | -use Ffcms\Core\Helper\Type\Arr; |
|
| 9 | 8 | use Ffcms\Core\Helper\Type\Obj; |
| 10 | 9 | use Ffcms\Core\Helper\Type\Str; |
| 11 | 10 | use Ffcms\Core\Filter\Native; |
@@ -169,7 +169,7 @@ |
||
| 169 | 169 | if ($inputType !== 'file') { |
| 170 | 170 | if ($html !== true) { |
| 171 | 171 | $field_value = App::$Security->strip_tags($field_value); |
| 172 | - } elseif($secure !== true) { |
|
| 172 | + } elseif ($secure !== true) { |
|
| 173 | 173 | $field_value = App::$Security->secureHtml($field_value); |
| 174 | 174 | } |
| 175 | 175 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $breakerPos = mb_strpos($text, '<br', null, 'UTF-8'); |
| 36 | 36 | } else { |
| 37 | 37 | // add length('</p>') |
| 38 | - $breakerPos+= 4; |
|
| 38 | + $breakerPos += 4; |
|
| 39 | 39 | } |
| 40 | 40 | // cut text from position caret before </p> (+4 symbols to save item as valid) |
| 41 | 41 | if ($breakerPos !== false) { |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * @param string|null $add |
| 19 | 19 | * @param array $params |
| 20 | 20 | * @param bool $encode |
| 21 | - * @return null|string |
|
| 21 | + * @return string |
|
| 22 | 22 | */ |
| 23 | 23 | public static function to($controller_action, $id = null, $add = null, array $params = null, $encode = true) |
| 24 | 24 | { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function on($event, \Closure $callback) |
| 39 | 39 | { |
| 40 | 40 | // check if event is a single string and parse it to array single item |
| 41 | - if (! Obj::isArray($event)) { |
|
| 41 | + if (!Obj::isArray($event)) { |
|
| 42 | 42 | $event = [$event]; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * Initialize Constructor. Pass model and type inside of current field inside. |
| 31 | - * @param Ffcms\Core\Arch\Model $model |
|
| 31 | + * @param \Ffcms\Core\Arch\Model $model |
|
| 32 | 32 | * @param string $type |
| 33 | 33 | */ |
| 34 | 34 | public function __construct($model, $formName = false, $type = 'text') |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Ffcms\Core\Helper\FileSystem; |
| 4 | 4 | |
| 5 | -use Ffcms\Core\Helper\Type\Str; |
|
| 6 | 5 | use FilesystemIterator; |
| 7 | 6 | use RecursiveDirectoryIterator; |
| 8 | 7 | use RecursiveIteratorIterator; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * String html tags and escape quotes |
| 48 | 48 | * @param string|array $html |
| 49 | 49 | * @param boolean $escapeQuotes |
| 50 | - * @return string|array|null |
|
| 50 | + * @return string|null |
|
| 51 | 51 | */ |
| 52 | 52 | public function strip_tags($html, $escapeQuotes = true) |
| 53 | 53 | { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * @deprecated |
| 88 | 88 | * @param $var |
| 89 | 89 | * @param null $indent |
| 90 | - * @return mixed|string |
|
| 90 | + * @return string |
|
| 91 | 91 | */ |
| 92 | 92 | public function var_export54($var, $indent = null, $guessTypes = false) { |
| 93 | 93 | return Arr::exportVar($var, $indent, $guessTypes); |