@@ -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 | { |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | $purifier = App::$Memory->get('object.purifier.helpers'); |
| 25 | 25 | } else { |
| 26 | 26 | $config = \HTMLPurifier_Config::createDefault(); |
| 27 | - $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/'); |
|
| 27 | + $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/'); |
|
| 28 | 28 | $config->set('AutoFormat.AutoParagraph', false); |
| 29 | 29 | |
| 30 | 30 | // allow use target=_blank for links |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | $build = null; |
| 65 | 65 | foreach ($property as $p => $v) { |
| 66 | 66 | if ($v === null || $v === false || $v === true) { |
| 67 | - $build .= ' ' . self::nohtml($p); |
|
| 67 | + $build .= ' '.self::nohtml($p); |
|
| 68 | 68 | } else { |
| 69 | - $build .= ' ' . self::nohtml($p) . '="' . self::nohtml($v) . '"'; |
|
| 69 | + $build .= ' '.self::nohtml($p).'="'.self::nohtml($v).'"'; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | return $build; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public static function buildSingleTag($tagName, array $property = null) |
| 82 | 82 | { |
| 83 | - return '<' . self::nohtml($tagName) . self::applyProperty($property) . '/>'; |
|
| 83 | + return '<'.self::nohtml($tagName).self::applyProperty($property).'/>'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $value = self::nohtml($value); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - return '<' . $tagName . self::applyProperty($property) . '>' . $value . '</' . $tagName . '>'; |
|
| 101 | + return '<'.$tagName.self::applyProperty($property).'>'.$value.'</'.$tagName.'>'; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -140,15 +140,15 @@ discard block |
||
| 140 | 140 | if (!Str::contains('/', $elementPoint) || count($elementArray) < 2) { |
| 141 | 141 | $active = $elementPoint === $currentPoint; |
| 142 | 142 | } else { |
| 143 | - $elementPoint = $elementArray[0] . '/' . $elementArray[1]; |
|
| 143 | + $elementPoint = $elementArray[0].'/'.$elementArray[1]; |
|
| 144 | 144 | $active = Str::startsWith($elementPoint, $currentPoint); |
| 145 | 145 | } |
| 146 | 146 | break; |
| 147 | 147 | case 'id': |
| 148 | 148 | $elementArray = explode('/', $elementPoint); |
| 149 | - $elementPoint = $elementArray[0] . '/' . $elementArray[1]; |
|
| 149 | + $elementPoint = $elementArray[0].'/'.$elementArray[1]; |
|
| 150 | 150 | if (null !== $elementArray[2]) { |
| 151 | - $elementPoint .= '/' . $elementArray[2]; |
|
| 151 | + $elementPoint .= '/'.$elementArray[2]; |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | $active = Str::startsWith($elementPoint, $currentPoint); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | public static function convertLink($uri) |
| 206 | 206 | { |
| 207 | - $link = App::$Alias->baseUrl . '/'; |
|
| 207 | + $link = App::$Alias->baseUrl.'/'; |
|
| 208 | 208 | if (Obj::isArray($uri)) { |
| 209 | 209 | $link .= Url::buildPathway($uri); |
| 210 | 210 | } elseif (Str::startsWith('http', $uri)) { |
@@ -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') |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | // check if properties is passed well |
| 46 | 46 | if (!Obj::isArray($properties) && $properties !== null) { |
| 47 | - throw new SyntaxException('Property must be passed as array or null! Field: ' . $name); |
|
| 47 | + throw new SyntaxException('Property must be passed as array or null! Field: '.$name); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | // add properties to autovalidation by js (properties passed by ref) |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | // if field is unknown type add notification in debugbar |
| 96 | 96 | if (App::$Debug !== null) { |
| 97 | - App::$Debug->addMessage('Field with name [' . App::$Security->strip_tags($name) . '] have unknown type [' . $this->type . ']', 'error'); |
|
| 97 | + App::$Debug->addMessage('Field with name ['.App::$Security->strip_tags($name).'] have unknown type ['.$this->type.']', 'error'); |
|
| 98 | 98 | } |
| 99 | - return 'No data: ' . App::$Security->strip_tags($name); |
|
| 99 | + return 'No data: '.App::$Security->strip_tags($name); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -143,12 +143,12 @@ discard block |
||
| 143 | 143 | if (Str::contains('.', $name)) { |
| 144 | 144 | $splitedName = explode('.', $name); |
| 145 | 145 | foreach ($splitedName as $nameKey) { |
| 146 | - $properties['name'] .= '[' . $nameKey . ']'; |
|
| 147 | - $properties['id'] .= '-' . $nameKey; |
|
| 146 | + $properties['name'] .= '['.$nameKey.']'; |
|
| 147 | + $properties['id'] .= '-'.$nameKey; |
|
| 148 | 148 | } |
| 149 | 149 | } else { // standard property definition - add field name |
| 150 | - $properties['name'] .= '[' . $name . ']'; |
|
| 151 | - $properties['id'] .= '-' . $name; |
|
| 150 | + $properties['name'] .= '['.$name.']'; |
|
| 151 | + $properties['id'] .= '-'.$name; |
|
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | \ No newline at end of file |
@@ -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; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if (isset($this->properties['options']) && Obj::isArray($this->properties['options'])) { |
| 45 | 45 | $options = $this->properties['options']; |
| 46 | 46 | } else { |
| 47 | - throw new SyntaxException('Options for field ' . self::nohtml($this->name) . ' is not defined'); |
|
| 47 | + throw new SyntaxException('Options for field '.self::nohtml($this->name).' is not defined'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | // set field type |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $this->properties['value'] = $opt; |
| 65 | 65 | // apply structured checkboxes style for each item |
| 66 | 66 | $build .= App::$View->render('native/form/multi_checkboxes_list', [ |
| 67 | - 'item' => self::buildSingleTag('input', $this->properties) . self::nohtml($opt) |
|
| 67 | + 'item' => self::buildSingleTag('input', $this->properties).self::nohtml($opt) |
|
| 68 | 68 | ]); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -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); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | public function __construct() |
| 17 | 17 | { |
| 18 | 18 | $config = \HTMLPurifier_Config::createDefault(); |
| 19 | - $config->set('Cache.SerializerPath', root . '/Private/Cache/HTMLPurifier/'); |
|
| 19 | + $config->set('Cache.SerializerPath', root.'/Private/Cache/HTMLPurifier/'); |
|
| 20 | 20 | $config->set('HTML.Allowed', 'p,b,strong,em,a[href],i,span,ul,ol,li,blockquote'); |
| 21 | 21 | //$config->set('URI.Base', 'http://www.example.com'); |
| 22 | 22 | //$config->set('URI.MakeAbsolute', true); |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | // @codingStandardsIgnoreFile |
| 7 | 7 | |
| 8 | 8 | use Codeception\Module\PhpBrowser; |
| 9 | -use Ffcms\Core\Helper\Acceptance; |
|
| 10 | 9 | |
| 11 | 10 | trait AcceptanceTesterActions |
| 12 | 11 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | // @codingStandardsIgnoreFile |
| 7 | 7 | |
| 8 | 8 | use Codeception\Module\Asserts; |
| 9 | -use Ffcms\Core\Helper\Unit; |
|
| 10 | 9 | |
| 11 | 10 | trait UnitTesterActions |
| 12 | 11 | { |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | use _generated\FunctionalTesterActions; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Define custom actions here |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * Define custom actions here |
|
| 25 | + */ |
|
| 26 | 26 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | /** |
| 25 | 25 | * Display native exception |
| 26 | 26 | * @param string $message |
| 27 | - * @return string|unknown |
|
| 27 | + * @return string |
|
| 28 | 28 | */ |
| 29 | 29 | public function display($message = null) |
| 30 | 30 | { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | protected function sendHTML($message = null) |
| 56 | 56 | { |
| 57 | 57 | header('HTTP/1.1 404 Not Found'); |
| 58 | - return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>' . $message . '</p></div></body></html>'; |
|
| 58 | + return '<!DOCTYPE html><html><head><title>An error has occurred</title></head><body><div style="width:60%; margin: auto; background-color: #fcc;border: 1px solid #faa; padding: 0.5em 1em;"><h1 style="font-size: 120%">Runtime error</h1><p>'.$message.'</p></div></body></html>'; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |