Passed
Push — master ( 2d8b0d...b00485 )
by Goffy
03:09
created

Readmes::cleaningMD()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 109
Code Lines 98

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 98
nc 1
nop 2
dl 0
loc 109
rs 8.0436
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace XoopsModules\Wggithub;
4
5
/*
6
 You may not change or alter any portion of this comment or credits
7
 of supporting developers from this source code or any supporting source code
8
 which is considered copyrighted (c) material of the original comment or credit authors.
9
10
 This program is distributed in the hope that it will be useful,
11
 but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
*/
14
15
/**
16
 * wgGitHub module for xoops
17
 *
18
 * @copyright      2020 XOOPS Project (https://xooops.org)
19
 * @license        GPL 2.0 or later
20
 * @package        wggithub
21
 * @since          1.0
22
 * @min_xoops      2.5.10
23
 * @author         Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com>
24
 */
25
26
use XoopsModules\Wggithub;
27
use XoopsModules\Wggithub\MDParser;
28
29
\defined('\XOOPS_ROOT_PATH') || die('Restricted access');
30
31
/**
32
 * Class Object Readmes
33
 */
34
class Readmes extends \XoopsObject
0 ignored issues
show
Bug introduced by
The type XoopsObject was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
35
{
36
    /**
37
     * Constructor
38
     *
39
     * @param null
40
     */
41
    public function __construct()
42
    {
43
        $this->initVar('rm_id', \XOBJ_DTYPE_INT);
0 ignored issues
show
Bug introduced by
The constant XOBJ_DTYPE_INT was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
44
        $this->initVar('rm_repoid', \XOBJ_DTYPE_INT);
45
        $this->initVar('rm_name', \XOBJ_DTYPE_TXTBOX);
0 ignored issues
show
Bug introduced by
The constant XOBJ_DTYPE_TXTBOX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
46
        $this->initVar('rm_type', \XOBJ_DTYPE_TXTBOX);
47
        $this->initVar('rm_content', \XOBJ_DTYPE_TXTAREA);
0 ignored issues
show
Bug introduced by
The constant XOBJ_DTYPE_TXTAREA was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
48
        $this->initVar('rm_encoding', \XOBJ_DTYPE_TXTBOX);
49
        $this->initVar('rm_downloadurl', \XOBJ_DTYPE_TXTBOX);
50
        $this->initVar('rm_baseurl', \XOBJ_DTYPE_TXTBOX);
51
        $this->initVar('rm_datecreated', \XOBJ_DTYPE_INT);
52
        $this->initVar('rm_submitter', \XOBJ_DTYPE_INT);
53
    }
54
55
    /**
56
     * @static function &getInstance
57
     *
58
     * @param null
59
     */
60
    public static function getInstance()
61
    {
62
        static $instance = false;
63
        if (!$instance) {
64
            $instance = new self();
65
        }
66
    }
67
68
    /**
69
     * The new inserted $Id
70
     * @return inserted id
0 ignored issues
show
Bug introduced by
The type XoopsModules\Wggithub\inserted was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
71
     */
72
    public function getNewInsertedIdReadmes()
73
    {
74
        $newInsertedId = $GLOBALS['xoopsDB']->getInsertId();
75
        return $newInsertedId;
76
    }
77
78
    /**
79
     * @public function getForm
80
     * @param bool $action
81
     * @param int  $start
82
     * @param int  $limit
83
     * @return \XoopsThemeForm
84
     */
85
    public function getFormReadmes($action = false, $start = 0, $limit = 0)
86
    {
87
        $helper = \XoopsModules\Wggithub\Helper::getInstance();
88
        if (!$action) {
89
            $action = $_SERVER['REQUEST_URI'];
90
        }
91
92
        // Title
93
        $title = $this->isNew() ? \sprintf(\_AM_WGGITHUB_README_ADD) : \sprintf(\_AM_WGGITHUB_README_EDIT);
94
        // Get Theme Form
95
        \xoops_load('XoopsFormLoader');
0 ignored issues
show
Bug introduced by
The function xoops_load was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
        /** @scrutinizer ignore-call */ 
96
        \xoops_load('XoopsFormLoader');
Loading history...
96
        $form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
0 ignored issues
show
Bug introduced by
The type XoopsThemeForm was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
97
        $form->setExtra('enctype="multipart/form-data"');
98
        // Form Table repositories
99
        $repositoriesHandler = $helper->getHandler('Repositories');
100
        $rmRepoidSelect = new \XoopsFormSelect(\_AM_WGGITHUB_README_REPOID, 'rm_repoid', $this->getVar('rm_repoid'));
0 ignored issues
show
Bug introduced by
The type XoopsFormSelect was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
101
        $rmRepoidSelect->addOptionArray($repositoriesHandler->getList());
102
        $form->addElement($rmRepoidSelect);
103
        // Form Text rmName
104
        $form->addElement(new \XoopsFormText(\_AM_WGGITHUB_README_NAME, 'rm_name', 50, 255, $this->getVar('rm_name')));
0 ignored issues
show
Bug introduced by
The type XoopsFormText was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
105
        // Form Text rmType
106
        $form->addElement(new \XoopsFormText(\_AM_WGGITHUB_README_TYPE, 'rm_type', 50, 255, $this->getVar('rm_type')));
107
        // Form Editor TextArea rmContent
108
        $form->addElement(new \XoopsFormTextArea(\_AM_WGGITHUB_README_CONTENT, 'rm_content', $this->getVar('rm_content', 'e'), 4, 47));
0 ignored issues
show
Bug introduced by
The type XoopsFormTextArea was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
109
        // Form Text rmEncoding
110
        $form->addElement(new \XoopsFormText(\_AM_WGGITHUB_README_ENCODING, 'rm_encoding', 50, 255, $this->getVar('rm_encoding')));
111
        // Form Text rmDownloadurl
112
        $form->addElement(new \XoopsFormText(\_AM_WGGITHUB_README_DOWNLOADURL, 'rm_downloadurl', 50, 255, $this->getVar('rm_downloadurl')));
113
        // Form Text rmBaseurl
114
        $form->addElement(new \XoopsFormText(\_AM_WGGITHUB_README_BASEURL, 'rm_baseurl', 50, 255, $this->getVar('rm_baseurl')));
115
        // Form Text Date Select rmDatecreated
116
        $rmDatecreated = $this->isNew() ?: $this->getVar('rm_datecreated');
117
        $form->addElement(new \XoopsFormTextDateSelect(\_AM_WGGITHUB_README_DATECREATED, 'rm_datecreated', '', $rmDatecreated));
0 ignored issues
show
Bug introduced by
The type XoopsFormTextDateSelect was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
118
        // Form Select User rmSubmitter
119
        $form->addElement(new \XoopsFormSelectUser(\_AM_WGGITHUB_README_SUBMITTER, 'rm_submitter', false, $this->getVar('rm_submitter')));
0 ignored issues
show
Bug introduced by
The type XoopsFormSelectUser was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
120
        // To Save
121
        $form->addElement(new \XoopsFormHidden('op', 'save'));
0 ignored issues
show
Bug introduced by
The type XoopsFormHidden was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
122
        $form->addElement(new \XoopsFormHidden('start', $start));
123
        $form->addElement(new \XoopsFormHidden('limit', $limit));
124
        $form->addElement(new \XoopsFormButtonTray('', _SUBMIT, 'submit', '', false));
0 ignored issues
show
Bug introduced by
The constant XoopsModules\Wggithub\_SUBMIT was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
Bug introduced by
The type XoopsFormButtonTray was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
125
        return $form;
126
    }
127
128
    /**
129
     * Get Values
130
     * @param null $keys
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $keys is correct as it would always require null to be passed?
Loading history...
131
     * @param null $format
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $format is correct as it would always require null to be passed?
Loading history...
132
     * @param null $maxDepth
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $maxDepth is correct as it would always require null to be passed?
Loading history...
133
     * @return array
134
     */
135
    public function getValuesReadmes($keys = null, $format = null, $maxDepth = null)
136
    {
137
        $helper  = \XoopsModules\Wggithub\Helper::getInstance();
138
        $utility = new \XoopsModules\Wggithub\Utility();
139
        $ret = $this->getValues($keys, $format, $maxDepth);
140
        $ret['id']            = $this->getVar('rm_id');
141
        $repositoriesHandler = $helper->getHandler('Repositories');
142
        $repositoriesObj = $repositoriesHandler->get($this->getVar('rm_repoid'));
143
        $repoName = '*****missing repo_name*****';
144
        if (\is_object($repositoriesObj)) {
145
            $repoName = $repositoriesObj->getVar('repo_name');
146
        }
147
        $ret['repoid']        = $repoName;
148
        $rmName = $this->getVar('rm_name');
149
        $ret['name']          = $rmName;
150
        $ret['type']          = $this->getVar('rm_type');
151
        $baseUrl              = $this->getVar('rm_baseurl');
152
        $ret['baseurl']       = $baseUrl;
153
        $ret['content']       = $this->getVar('rm_content', 'e');
154
        $contentDecoded = base64_decode($this->getVar('rm_content', 'n'));
155
        if ('.MD' == \substr(strtoupper($rmName), -3)) {
156
            $Parsedown = new MDParser\Parsedown();
157
            $contentEncoded = $Parsedown->text($contentDecoded);
158
            $baseUrl = \str_replace('/blob/', '/raw/', $baseUrl);
159
            $contentClean = $this->cleaningMD($contentEncoded, $baseUrl);
160
        } else {
161
            $contentClean = $contentDecoded;
162
        }
163
        $ret['content_clean'] = $contentClean;
164
        $editorMaxchar = $helper->getConfig('editor_maxchar');
165
        $ret['content_short'] = $utility::truncateHtml($ret['content'], $editorMaxchar);
166
        $ret['encoding']      = $this->getVar('rm_encoding');
167
        $ret['downloadurl']   = $this->getVar('rm_downloadurl');
168
        $ret['datecreated']   = \formatTimestamp($this->getVar('rm_datecreated'), 'm');
0 ignored issues
show
Bug introduced by
The function formatTimestamp was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

168
        $ret['datecreated']   = /** @scrutinizer ignore-call */ \formatTimestamp($this->getVar('rm_datecreated'), 'm');
Loading history...
169
        $ret['submitter']     = \XoopsUser::getUnameFromId($this->getVar('rm_submitter'));
0 ignored issues
show
Bug introduced by
The type XoopsUser was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
170
        $ret['gitbook_link']  = '';
171
        if (\strpos($ret['downloadurl'], 'XoopsDoc') > 0) {
172
            $ret['gitbook_link']  = 'https://xoops.gitbook.io/' . $repoName . '/';
173
        }
174
        return $ret;
175
    }
176
177
    /**
178
     * Returns an array representation of the object
179
     *
180
     * @return array
181
     */
182
    public function toArrayReadmes()
183
    {
184
        $ret = [];
185
        $vars = $this->getVars();
186
        foreach (\array_keys($vars) as $var) {
187
            $ret[$var] = $this->getVar('"{$var}"');
188
        }
189
        return $ret;
190
    }
191
    /**
192
     * Returns an array representation of the object
193
     * @param  $textMD
194
     * @param  $baseUrl
195
     * @return string
196
     */
197
    private function cleaningMD($textMD, $baseUrl)
198
    {
199
        $baseUrl = \str_replace('/blob/', '/raw/', $baseUrl);
200
201
        $contentClean = \str_replace('http://', 'https://', $textMD);
202
203
        //replace image links
204
        $arrSearch = [
205
            'src="https://xoops.org/images/logoXoopsPhp8_400.png',
206
            "src='https://xoops.org/images/logoXoopsPhp8_400.png",
207
            'src=".gitbook/assets/',
208
            "src='.gitbook/assets/",
209
            'src="en/assets/',
210
            "src='en/assets/",
211
            'src="assets/',
212
            "src='assets/"
213
        ];
214
        $arrReplace = [
215
            'src="https://xoops.org/images/logoXoopsPhp8.png',
216
            "src='https://xoops.org/images/logoXoopsPhp8.png",
217
            'src="' . $baseUrl . '.gitbook/assets/',
218
            "src='" . $baseUrl . '.gitbook/assets/',
219
            'src="' . $baseUrl . 'en/assets/',
220
            "src='" . $baseUrl . 'en/assets/',
221
            'src="' . $baseUrl . 'assets/',
222
            "src='" . $baseUrl . 'assets/'
223
        ];
224
        $contentClean = \str_replace($arrSearch, $arrReplace, $contentClean);
225
226
        //replace known missing images
227
        $arrSearch = [
228
            'src="' . XOOPS_URL . '/screenshot.jpg',
0 ignored issues
show
Bug introduced by
The constant XoopsModules\Wggithub\XOOPS_URL was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
229
            'src="' . XOOPS_URL . '/sd-099-theme-surprice.gif',
230
            'src="' . XOOPS_URL . '/shot.gif',
231
            'src="' . XOOPS_URL . '/shot.jpg',
232
            'src="' . XOOPS_URL . '/theme_preview.png',
233
            'src="https://github.com/xoops/newbb-tutorial/tree/54ef6104e66b74e8c6dea683d3cce70ceafdd739/assets/image001.jpg',
234
            'src="https://github.com/xoops/repairshop-tutorial/tree/719d6d32dea221b3e980fd3d6222f179ac898394/en/assets/img_2.jpg',
235
            'src="https://github.com/xoops/xoops-mylinks-tutorial/tree/d30c30645d48c5ead51399ff711c25935cbd0495/en/assets/forkit.png',
236
            'src="https://github.com/xoops/xoopspartners-tutorial/tree/f41bf73b884ccd906dc6a8323363b9b1aa3f8d02/en/assets/forkit.png',
237
            'src="https://github.com/XoopsDocs/adslight-tutorial/raw/master/en/assets/image001.png',
238
            'src="https://github.com/XoopsDocs/avaman-tutorial/raw/master/en/assets/image001.png',
239
            'src="https://github.com/XoopsDocs/extgallery-tutorial/raw/master/en/assets/forkit.png',
240
            'src="https://github.com/XoopsDocs/extgallery-tutorial/raw/master/en/assets/image001.png',
241
            'src="https://github.com/XoopsDocs/presenter-tutorial/raw/master/en/assets/image001.png',
242
            'src="https://github.com/XoopsDocs/smartpartner-tutorial/raw/master/en/assets/image001.png',
243
            'src="https://github.com/XoopsDocs/tag-tutorial/raw/master/en/assets/image001.png',
244
            'src="https://github.com/XoopsDocs/wfdownloads-tutorial/raw/master/en/assets/forkit.png',
245
            'src="https://github.com/XoopsDocs/wfdownloads-tutorial/raw/master/en/assets/image001.png',
246
            'src="https://github.com/XoopsDocs/xasset-tutorial/tree/9b95bc0ae0219c95a8cf16e77b9cd2175d856e89/en/assets/image001.png',
247
            'src="https://github.com/XoopsDocs/xoops_codex/raw/master/en/assets/image001.png',
248
            'src="https://img.shields.io/codeclimate/github/mambax7/adslight.svg?style=flat',
249
            'src="https://img.shields.io/codeclimate/github/mambax7/avaman.svg?style=flat',
250
            'src="https://img.shields.io/codeclimate/github/mambax7/extcal.svg?style=flat',
251
            'src="https://img.shields.io/codeclimate/github/mambax7/extgallery.svg?style=flat',
252
            'src="https://img.shields.io/codeclimate/github/mambax7/gbook.svg?style=flat',
253
            'src="https://img.shields.io/codeclimate/github/mambax7/marquee.svg?style=flat',
254
            'src="https://img.shields.io/codeclimate/github/mambax7/mastopgo2.svg?style=flat',
255
            'src="https://img.shields.io/codeclimate/github/mambax7/moduleinstaller.svg?style=flat',
256
            'src="https://img.shields.io/codeclimate/github/mambax7/myconference.svg?style=flat',
257
            'src="https://img.shields.io/codeclimate/github/mambax7/newbb.svg?style=flat',
258
            'src="https://img.shields.io/codeclimate/github/mambax7/planet.svg?style=flat',
259
            'src="https://img.shields.io/codeclimate/github/mambax7/publisher.svg?style=flat',
260
            'src="https://img.shields.io/codeclimate/github/mambax7/randomquote.svg?style=flat',
261
            'src="https://img.shields.io/codeclimate/github/mambax7/references/.svg?style=flat',
262
            'src="https://img.shields.io/codeclimate/github/mambax7/smartfaq.svg?style=flat',
263
            'src="https://img.shields.io/codeclimate/github/mambax7/smartpartner.svg?style=flat',
264
            'src="https://img.shields.io/codeclimate/github/mambax7/suico.svg?style=flat',
265
            'src="https://img.shields.io/codeclimate/github/mambax7/tdmpicture.svg?style=flat',
266
            'src="https://img.shields.io/codeclimate/github/mambax7/waiting.svg?style=flat',
267
            'src="https://img.shields.io/codeclimate/github/mambax7/wflinks.svg?style=flat',
268
            'src="https://img.shields.io/codeclimate/github/mambax7/xfaq.svg?style=flat',
269
            'src="https://img.shields.io/codeclimate/github/mambax7/xoopsheadline.svg?style=flat',
270
            'src="https://img.shields.io/codeclimate/github/mambax7/xoopspoll.svg?style=flat',
271
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/about.svg?style=flat',
272
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/adminer.svg?style=flat',
273
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/contact.svg?style=flat',
274
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/content.svg?style=flat',
275
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/cssholmes.svg?style=flat',
276
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/lexikon.svg?style=flat',
277
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/myiframe.svg?style=flat',
278
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/mylinks.svg?style=flat',
279
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/mymenus.svg?style=flat',
280
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/news.svg?style=flat',
281
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/smallworld.svg?style=flat',
282
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/soapbox.svg?style=flat',
283
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/tag.svg?style=flat',
284
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/tdmdownloads.svg?style=flat',
285
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/userlog.svg?style=flat',
286
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xbssacc.svg?style=flat',
287
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xbstags.svg?style=flat',
288
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xbsvat.svg?style=flat',
289
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xfguestbook.svg?style=flat',
290
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xlanguage.svg?style=flat',
291
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xmfdemo.svg?style=flat',
292
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xoopsfaq.svg?style=flat',
293
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xoopshp.svg?style=flat',
294
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xoopsinfo.svg?style=flat',
295
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xoopspartners.svg?style=flat',
296
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xoopstube.svg?style=flat',
297
            'src="https://img.shields.io/codeclimate/github/XoopsModules25x/xsitemap.svg?style=flat',
298
            'src="https://img.shields.io/github/release/mambax7/references/.svg?style=flat',
299
            'src="https://img.shields.io/github/tag/mambax7/references/.svg?style=flat',
300
            'src="https://insight.sensiolabs.com/projects/7ada0220-a68e-4369-aef0-950172630ff8/mini.png',
301
            'src="https://xoops.org/images/translations-github-blue.svg',
302
        ];
303
        $contentClean = \str_replace($arrSearch, 'src="' . WGGITHUB_IMAGE_URL . '/blank.gif', $contentClean);
304
305
        return $contentClean;
306
    }
307
}
308