@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | if ($schema->getStructureId() == $structureId) { |
| 73 | 73 | |
| 74 | 74 | // Render elements if exists |
| 75 | - $isElements = isset($schema->elements)&&(!empty($schema->elements)); |
|
| 75 | + $isElements = isset($schema->elements) && (!empty($schema->elements)); |
|
| 76 | 76 | |
| 77 | 77 | // If exists elements on the tab then show their |
| 78 | 78 | if ($isElements) { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | // Insert element as first child of table |
| 87 | 87 | $content = preg_replace( |
| 88 | 88 | '/\<div class=\"material_table_tab\"\>/', |
| 89 | - '<div class="material_table_tab">' . $contentNestedElement, |
|
| 89 | + '<div class="material_table_tab">'.$contentNestedElement, |
|
| 90 | 90 | $content, |
| 91 | 91 | 1 |
| 92 | 92 | ); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * @param $query |
| 154 | 154 | * @param $entity |
| 155 | 155 | */ |
| 156 | - public function renderMaterialTab(\samsoncms\app\material\form\Form &$form, $renderer, $query, $entity) |
|
| 156 | + public function renderMaterialTab(\samsoncms\app\material\form\Form&$form, $renderer, $query, $entity) |
|
| 157 | 157 | { |
| 158 | 158 | |
| 159 | 159 | $migrate = new \samsoncms\seo\Migrate($this->query); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | // If content not empty render field(meta tag) |
| 250 | 250 | if (isset($content{0})) { |
| 251 | 251 | // Save html view |
| 252 | - $html .= $this->view($schema->view)->name($alias)->content($content)->output() . "\n"; |
|
| 252 | + $html .= $this->view($schema->view)->name($alias)->content($content)->output()."\n"; |
|
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -300,9 +300,9 @@ discard block |
||
| 300 | 300 | public function templateRenderer(&$html, $parameters, $module) |
| 301 | 301 | { |
| 302 | 302 | // TODO: Change this to normal dependency |
| 303 | - if($module->id() != 'compressor') { |
|
| 303 | + if ($module->id() != 'compressor') { |
|
| 304 | 304 | $content = $this->show(); |
| 305 | - $html = str_ireplace('</head>', $content . '</head>', $html); |
|
| 305 | + $html = str_ireplace('</head>', $content.'</head>', $html); |
|
| 306 | 306 | } |
| 307 | 307 | } |
| 308 | 308 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | |
| 67 | 67 | // Set field name with prefix of schema |
| 68 | - $fieldNameFull = $fieldName . '_' . $schema->id; |
|
| 68 | + $fieldNameFull = $fieldName.'_'.$schema->id; |
|
| 69 | 69 | $fieldValue = $this->getDataField($fieldNameFull, $material); |
| 70 | 70 | |
| 71 | 71 | // If in the current schema need value wasn't found then find in sibling schemas |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // Set field name with prefix of schema |
| 83 | - $fieldNameFull = $fieldName . '_' . $schemaFind->id; |
|
| 83 | + $fieldNameFull = $fieldName.'_'.$schemaFind->id; |
|
| 84 | 84 | |
| 85 | 85 | // If it is deep search i.e search in parent structures then change current material to parent |
| 86 | 86 | if ($deep == true) { |
@@ -204,11 +204,11 @@ discard block |
||
| 204 | 204 | foreach ($schema->relations as $fieldName => $alias) { |
| 205 | 205 | |
| 206 | 206 | // Get value |
| 207 | - $content = trim($material[$fieldName . '_' . $schema->id]); |
|
| 207 | + $content = trim($material[$fieldName.'_'.$schema->id]); |
|
| 208 | 208 | |
| 209 | 209 | if (isset($content{0})) { |
| 210 | 210 | // Render |
| 211 | - $html .= $renderer->view($schema->view)->name($alias)->content($content)->output() . "\n"; |
|
| 211 | + $html .= $renderer->view($schema->view)->name($alias)->content($content)->output()."\n"; |
|
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | foreach ($elements as $element) { |
| 64 | 64 | |
| 65 | 65 | // Check if this element is nested |
| 66 | - $isNested = (isset($element['Nested'])&&$element['Nested'] == true); |
|
| 66 | + $isNested = (isset($element['Nested']) && $element['Nested'] == true); |
|
| 67 | 67 | |
| 68 | 68 | if (isset($element['Field']) && ($field == false)) { |
| 69 | 69 | continue; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | |
| 79 | 79 | // Check if this element is need to be hide |
| 80 | - $isHide = (isset($element['Hide'])&&$element['Hide'] == true); |
|
| 80 | + $isHide = (isset($element['Hide']) && $element['Hide'] == true); |
|
| 81 | 81 | |
| 82 | 82 | // If not right go further |
| 83 | 83 | if ($isHide) { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * Class Info block which show info about something |
| 13 | 13 | * @package samsoncms\seo\render |
| 14 | 14 | */ |
| 15 | -class Info{ |
|
| 15 | +class Info { |
|
| 16 | 16 | |
| 17 | 17 | public function __construct($renderer, $data) |
| 18 | 18 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $mainSiteMapContent = $xml->generateIndexSiteMap($mainParams, $this->filePrefix); |
| 102 | 102 | |
| 103 | 103 | // Save |
| 104 | - $xml->saveXmlToFile($this->mainMapName . '.xml', $mainSiteMapContent); |
|
| 104 | + $xml->saveXmlToFile($this->mainMapName.'.xml', $mainSiteMapContent); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | $time_elapsed_secs = microtime(true) - $start; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $fileName = 'static.xml'; |
| 142 | 142 | |
| 143 | 143 | // Create site map file for current category |
| 144 | - $xml->saveXmlToFile($this->filePrefix . $fileName, $result); |
|
| 144 | + $xml->saveXmlToFile($this->filePrefix.$fileName, $result); |
|
| 145 | 145 | |
| 146 | 146 | return $count; |
| 147 | 147 | } |
@@ -178,16 +178,16 @@ discard block |
||
| 178 | 178 | $fileName = preg_replace('/^\//', '', $link); |
| 179 | 179 | |
| 180 | 180 | // Exchange all slash to dash |
| 181 | - $fileName = preg_replace('/\//', '-', $fileName) . '.xml'; |
|
| 181 | + $fileName = preg_replace('/\//', '-', $fileName).'.xml'; |
|
| 182 | 182 | |
| 183 | 183 | // Create site map file for current category |
| 184 | - $xml->saveXmlToFile($this->filePrefix . $fileName, $result); |
|
| 184 | + $xml->saveXmlToFile($this->filePrefix.$fileName, $result); |
|
| 185 | 185 | |
| 186 | 186 | $links[] = $param; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | // If need recursively execute structures |
| 190 | - if ((isset($param['__SEO_IsRecursive']))&&($param['__SEO_IsRecursive'] == true)||$recursive) { |
|
| 190 | + if ((isset($param['__SEO_IsRecursive'])) && ($param['__SEO_IsRecursive'] == true) || $recursive) { |
|
| 191 | 191 | |
| 192 | 192 | $structures = null; |
| 193 | 193 | $this->query->className('structure') |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | if (!empty($urls)) { |
| 55 | 55 | |
| 56 | 56 | // Get full path |
| 57 | - $path = $this->currentHost . $category . DIRECTORY_SEPARATOR; |
|
| 57 | + $path = $this->currentHost.$category.DIRECTORY_SEPARATOR; |
|
| 58 | 58 | |
| 59 | 59 | // Add separator |
| 60 | 60 | $tagAsSeparator = "</loc></url><url><loc>{$path}"; |
| 61 | 61 | |
| 62 | 62 | // Implode all array elements and concatenate separator with right xml tags and concatenate first and last tags |
| 63 | - $xml = '<url><loc>' . $path . implode($tagAsSeparator, $urls) . '</loc></url>'; |
|
| 63 | + $xml = '<url><loc>'.$path.implode($tagAsSeparator, $urls).'</loc></url>'; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return $xml; |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | $innerBlock = $this->getXmlContentByUrls($urls, $path); |
| 91 | 91 | |
| 92 | 92 | // Concatenate header and footer of xml text |
| 93 | - $result = "<?xml version='1.0' standalone='yes'?>" . |
|
| 93 | + $result = "<?xml version='1.0' standalone='yes'?>". |
|
| 94 | 94 | '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" |
| 95 | 95 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 96 | 96 | xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 |
| 97 | - http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . $innerBlock . '</urlset>'; |
|
| 97 | + http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . $innerBlock.'</urlset>'; |
|
| 98 | 98 | |
| 99 | 99 | return $result; |
| 100 | 100 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $this->schema = $schema; |
| 42 | 42 | // Set name and id of module |
| 43 | 43 | if ($locale != '') { |
| 44 | - $this->id .= '-' . $this->locale; |
|
| 44 | + $this->id .= '-'.$this->locale; |
|
| 45 | 45 | $this->name = $this->locale; |
| 46 | 46 | } else { |
| 47 | 47 | $this->name = 'all'; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | |
| 82 | 82 | // Render elements if exists |
| 83 | - $isElements = isset($this->schema->elements)&&(!empty($this->schema->elements)); |
|
| 83 | + $isElements = isset($this->schema->elements) && (!empty($this->schema->elements)); |
|
| 84 | 84 | if ($isElements) { |
| 85 | 85 | |
| 86 | 86 | // Create element instance |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $html = $subTab->content(); |
| 140 | 140 | |
| 141 | 141 | // Render elements if exists |
| 142 | - $isElements = isset($subTab->schema->elements)&&(!empty($subTab->schema->elements)); |
|
| 142 | + $isElements = isset($subTab->schema->elements) && (!empty($subTab->schema->elements)); |
|
| 143 | 143 | if ($isElements) { |
| 144 | 144 | |
| 145 | 145 | // Create element instance |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $contentNestedElement = $elements->renderNestedElements($subTab->schema->elements); |
| 150 | 150 | |
| 151 | 151 | // Insert element as first child of table |
| 152 | - $html = preg_replace('/>/', '>' . $contentNestedElement, $html, 1); |
|
| 152 | + $html = preg_replace('/>/', '>'.$contentNestedElement, $html, 1); |
|
| 153 | 153 | |
| 154 | 154 | // Get all not nested element |
| 155 | 155 | $contentNotNestedElement = $elements->renderNotNestedElements($subTab->schema->elements); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if ($isElements) { |
| 163 | 163 | |
| 164 | 164 | // Concatenate element to main view |
| 165 | - $content = $contentNotNestedElement . $content; |
|
| 165 | + $content = $contentNotNestedElement.$content; |
|
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | |
@@ -177,5 +177,5 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | } else { |
| 180 | - class Tab{} |
|
| 180 | + class Tab {} |
|
| 181 | 181 | } |
@@ -169,13 +169,13 @@ discard block |
||
| 169 | 169 | // Iterate and create all fields |
| 170 | 170 | foreach ($fields as $field) { |
| 171 | 171 | |
| 172 | - $fieldInstance = $this->isFieldExists($field['Name'] . '_' . $prefix); |
|
| 172 | + $fieldInstance = $this->isFieldExists($field['Name'].'_'.$prefix); |
|
| 173 | 173 | |
| 174 | 174 | // If field not exists then create it |
| 175 | 175 | if (!$fieldInstance) { |
| 176 | 176 | // Create and add field to structure |
| 177 | 177 | $fieldInstance = $this->createField( |
| 178 | - $field['Name'] . '_' . $prefix, |
|
| 178 | + $field['Name'].'_'.$prefix, |
|
| 179 | 179 | $field['Description'], |
| 180 | 180 | $field['Type'], |
| 181 | 181 | // If it is the select type then add value |
@@ -361,8 +361,8 @@ discard block |
||
| 361 | 361 | // Set prefix of material |
| 362 | 362 | $prefix = 'Material of '; |
| 363 | 363 | $material = $this->createNestedMaterial( |
| 364 | - $prefix . $structure->Name, |
|
| 365 | - $prefix . $structure->Url |
|
| 364 | + $prefix.$structure->Name, |
|
| 365 | + $prefix.$structure->Url |
|
| 366 | 366 | ); |
| 367 | 367 | |
| 368 | 368 | $this->assignNestedMaterial($material, $structure); |