GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( d5b0c7...ce5f63 )
by Kevin
05:23 queued 02:38
created

ThemeConfiguration::getLoadMaskXpath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Magium\Magento\Themes\Admin;
4
5
use Magium\AbstractConfigurableElement;
6
use Magium\AbstractTestCase;
7
use Magium\Magento\Themes\NavigableThemeInterface;
8
9
class ThemeConfiguration extends AbstractConfigurableElement implements  NavigableThemeInterface
0 ignored issues
show
Coding Style introduced by
Expected 1 space before "NavigableThemeInterface"; 2 found
Loading history...
10
{
11
12
    const THEME = 'Magium\Magento\Themes\Admin\ThemeConfiguration';
13
14
    public $baseUrl = 'http://localhost/admin';
15
16
    public $homeXpath = '//img[@class="logo"]';
17
18
    public $loginUsernameField           = '//input[@type="text" and @id="username"]';
19
    public $loginPasswordField           = '//input[@type="password" and @id="login"]';
20
    public $loginSubmitButton            = '//input[@type="submit" and @value="{{Login}}"]';
21
    
22
    public $navigationBaseXPathSelector          = '//ul[@id="nav"]';
23
//    public $navigationChildXPathSelector1         = 'li/descendant::span[.="{{%s}}"]';
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
24
    public $navigationChildXPathSelector         = 'a[concat(" ",normalize-space(.)," ") = " {{%s}} "]/..';
25
26
    public $adminPopupMessageContainerXpath         = '//*[@id="message-popup-window"]';
27
    public $adminPopupMessageCloseButtonXpath        = '//*[@id="message-popup-window"]/descendant::*[@title="close"]';
28
29
    public $systemConfigTabsXpath                = '//ul[@id="system_config_tabs"]/descendant::a[concat(" ",normalize-space(.)," ") = " {{%s}} "]';
30
    public $systemConfigSectionToggleXpath             = '//form[@id="config_edit_form"]/descendant::div[contains(concat(" ",normalize-space(@class)," ")," section-config ")]/descendant::a[.="{{%s}}"]';
31
    public $systemConfigSectionDisplayCheckXpath            = '//legend[.="{{%s}}"]/ancestor::fieldset';
32
    public $systemConfigToggleEnableXpath            = '//legend[.="{{%s}}"]/../descendant::td[concat(" ",normalize-space(.)," ") = " {{Enabled}} "]/../td/descendant::select/option[@value="%d"]';
33
34
    public $xTreeRootXpath                          = '//ul[contains(concat(" ",normalize-space(@class)," ")," x-tree-root-ct ")]/div/li[contains(concat(" ",normalize-space(@class)," ")," x-tree-node ")]/div/a';
35
    public $xTreeNamedRootXpath                          = '//ul[contains(concat(" ",normalize-space(@class)," ")," x-tree-root-ct ")]/div/li[contains(concat(" ",normalize-space(@class)," ")," x-tree-node ")]/div/a[contains(concat("---",normalize-space(.)), "---{{%s}} (")]';
36
    public $xTreeChildXpath                          = 'ul/li[contains(concat(" ",normalize-space(@class)," ")," x-tree-node ")]/div/a/span[contains(concat("---",normalize-space(.)), "---{{%s}} (")]/..';
37
    public $xTreeChildNodePrefixXpath                = '/../..';
38
    public $xTreeChildNodeExpandPrefixXpath          = '/../img[contains(concat(" ",normalize-space(@class)," ")," x-tree-ec-icon ")]';
39
40
    public $systemConfigurationSaveButtonXpath       = '//div[@class="main-col-inner"]/div[@class="content-header"]/descendant::button[@title="{{Save Config}}"]';
41
42
    public $systemConfigSaveSuccessfulXpath          = '//li[@class="success-msg"]/descendant::span[.="{{The configuration has been saved}}."]';
43
44
    public $testLoggedInAtBaseUrl                     = '//a[@class="active"]/span[.="{{Dashboard}}"]';
45
46
    public $tableButtonXpath                         = '//table[@class="actions"]/descendant::span[.="{{%s}}"]';
47
48
    public $selectOrderXpath                         = '//table[@id="sales_order_grid_table"]/descendant::td[concat(" ",normalize-space(.)," ") = " %s "]/../td/a[.="{{View}}"]';
49
    public $selectCustomerXpath                         = '//table[@id="customerGrid_table"]/descendant::td[concat(" ",normalize-space(.)," ") = " %s "]/../td/a[.="{{Edit}}"]';
50
51
    public $systemConfigSettingLabelXpath            = '//td[@class="label"]/label[.=" {{%s}}"]';
52
53
    public $widgetTabXpath                           = '//a[contains(@class, "tab-item-link")]/span[.="{{%s}}"]';
54
    public $widgetTabHeaderXpath                     = '//div[@class="entry-edit-head"]/h4[.="{{%s}}"]';
55
    public $widgetAttributeByLabelXpath              = '//table[@class="form-list"]/descendant::td[@class="label"]/label[.="{{%s}} *" or .="{{%s}}*" or .="{{%s}} " or .="{{%s}}"]/ancestor::tr/td[@class="value"]/*[@name]';
56
    public $widgetActionButtonXpath                  = '//div[@class="content-header"]/descendant::button/descendant::span[.="{{%s}}"]';
57
58
    public $guaranteedPageLoadedElementDisplayedXpath = '//div[@class="footer"]';
59
60
    public $successfulActionXpath                    = '//li[@class="success-msg"]';
61
    public $errorActionXpath                    = '//li[@class="error-msg"]';
62
63
    public $shippingCarrierXpath                = '//select[@name="tracking[%d][carrier_code]"]';
64
    public $shippingTitleXpath                = '//input[@name="tracking[%d][title]"]';
65
    public $shippingTrackingNumberXpath                = '//input[@name="tracking[%d][number]"]';
66
67
    public $formButtonXpath = '//div[@class="content-header"]/p[@class="form-buttons"]/descendant::span[.="{{%s}}"]';
68
69
    public $cacheNavigationPath = '{{System}}/{{Cache Management}}';
70
71
    public $cacheTargetXpath = '//input[@name="types" and @value="{{%s}}"]';
72
73
    public $cacheAllTargetsXpath = '//input[@name="types"]';
74
75
    public $cacheMassActionOptionXpath = '//select[@id="cache_grid_massaction-select"]/option[@value="{{%s}}"]';
76
77
    public $cacheSubmitXpath = '//button[@title="{{Submit}}"]';
78
79
    public $firstTermsRowXpath = '//table[@id="agreementGrid_table"]/tbody/tr/td[not(contains(concat(" ",normalize-space(@class)," ")," empty-text "))]';
80
81
    public $orderCancelledMessageXpath = '//div[@id="messages"]/descendant::span[contains(., "{{The order has been cancelled}}")]';
82
83
    public $loadingMaskXpath = '//*[@id="loading-mask"]';
84
85
    public function getLoadMaskXpath()
86
    {
87
        return $this->loadingMaskXpath;
88
    }
89
90
    /**
91
     * @return string
92
     */
93
    public function getOrderCancelledMessageXpath()
94
    {
95
        return $this->translatePlaceholders($this->orderCancelledMessageXpath);
96
    }
97
98
99
100
    /**
101
     * @return string
102
     */
103
    public function getFirstTermsRowXpath()
104
    {
105
        return $this->firstTermsRowXpath;
106
    }
107
108
    /**
109
     * @return string
110
     */
111
    public function getCacheSubmitXpath()
112
    {
113
        return $this->translatePlaceholders($this->cacheSubmitXpath);
114
    }
115
116
117
118
    /**
119
     * @return string
120
     */
121
    public function getCacheMassActionOptionXpath($option)
122
    {
123
        $xpath = sprintf($this->cacheMassActionOptionXpath, $option);
124
        return $this->translatePlaceholders($xpath);
125
    }
126
127
128
129
    /**
130
     * @return string
131
     */
132
    public function getCacheAllTargetsXpath()
133
    {
134
        return $this->translatePlaceholders($this->cacheAllTargetsXpath);
135
    }
136
137
138
139
    /**
140
     * @return string
141
     */
142
    public function getCacheTargetXpath($type)
143
    {
144
        $xpath = sprintf($this->cacheTargetXpath, $type);
145
        return $this->translatePlaceholders($xpath);
146
    }
147
148
149
150
    /**
151
     * @return string
152
     */
153
    public function getCacheNavigationPath()
154
    {
155
        return $this->translatePlaceholders($this->cacheNavigationPath);
156
    }
157
158
159
    public function getFormButtonXpath($button)
160
    {
161
        $xpath = sprintf($this->formButtonXpath, $button);
162
        return $this->translatePlaceholders($xpath);
163
    }
164
165
    /**
166
     * @return string
167
     */
168
    public function getShippingCarrierXpath($count)
169
    {
170
        $xpath = sprintf($this->shippingCarrierXpath, $count);
171
        return $xpath;
172
    }
173
174
    /**
175
     * @return string
176
     */
177
    public function getShippingTitleXpath($count)
178
    {
179
        $xpath = sprintf($this->shippingTitleXpath, $count);
180
        return $xpath;
181
    }
182
183
    /**
184
     * @return string
185
     */
186
    public function getShippingTrackingNumberXpath($count)
187
    {
188
        $xpath = sprintf($this->shippingTrackingNumberXpath, $count);
189
        return $xpath;
190
    }
191
192
193
194
    /**
195
     * @return string
196
     */
197
    public function getXTreeChildNodeExpandPrefixXpath()
198
    {
199
        return $this->translatePlaceholders($this->xTreeChildNodeExpandPrefixXpath);
200
    }
201
202
    /**
203
     * @return string
204
     */
205
    public function getXTreeNamedRootXpath($category)
206
    {
207
        $xpath = sprintf($this->xTreeNamedRootXpath, $category);
208
        return $this->translatePlaceholders($xpath);
209
    }
210
211
212
213
214
    /**
215
     * @return string
216
     */
217
    public function getXTreeChildNodePrefixXpath()
218
    {
219
        return $this->translatePlaceholders($this->xTreeChildNodePrefixXpath);
220
    }
221
222
    /**
223
     * @return string
224
     */
225
    public function getXTreeChildXpath($name)
226
    {
227
        $xpath = sprintf($this->xTreeChildXpath, $name);
228
        return $this->translatePlaceholders($xpath);
229
    }
230
231
    /**
232
     * @return string
233
     */
234
    public function getXTreeRootXpath()
235
    {
236
        return $this->translatePlaceholders($this->xTreeRootXpath);
237
    }
238
239
240
241
    public function set($name, $value)
242
    {
243
        $this->$name = $value;
244
    }
245
246
    /**
247
     * @return string
248
     */
249
    public function getSuccessfulActionXpath()
250
    {
251
        return $this->successfulActionXpath;
252
    }
253
254
    /**
255
     * @return string
256
     */
257
    public function getErrorActionXpath()
258
    {
259
        return $this->errorActionXpath;
260
    }
261
262
263
264
    /**
265
     * @return string
266
     */
267
    public function getWidgetActionButtonXpath($label)
268
    {
269
        return $this->translatePlaceholders(sprintf($this->widgetActionButtonXpath, $label));
270
    }
271
272
    /**
273
     * @return string
274
     */
275
    public function getWidgetAttributeByLabelXpath($attribute)
276
    {
277
        return $this->translatePlaceholders(sprintf($this->widgetAttributeByLabelXpath, $attribute, $attribute, $attribute, $attribute));
278
    }
279
280
281
282
    /**
283
     * @return string
284
     */
285
    public function getWidgetTabHeaderXpath($name)
286
    {
287
        return $this->translatePlaceholders(sprintf($this->widgetTabHeaderXpath, $name));
288
    }
289
290
    /**
291
     * @return string
292
     */
293
    public function getWidgetTabXpath($name)
294
    {
295
        return $this->translatePlaceholders(sprintf($this->widgetTabXpath, $name));
296
    }
297
298
299
300
    public function getGuaranteedPageLoadedElementDisplayedXpath()
301
    {
302
        return $this->translatePlaceholders($this->guaranteedPageLoadedElementDisplayedXpath);
303
    }
304
305
    /**
306
     * @param mixed $guaranteedPageLoadedElementDisplayedXpath
307
     */
308
    public function setGuaranteedPageLoadedElementDisplayedXpath($guaranteedPageLoadedElementDisplayedXpath)
309
    {
310
        $this->guaranteedPageLoadedElementDisplayedXpath = $guaranteedPageLoadedElementDisplayedXpath;
311
    }
312
313
    /**
314
     * @return string
315
     */
316
    public function getHomeXpath()
317
    {
318
        return $this->homeXpath;
319
    }
320
321
    /**
322
     * @return string
323
     */
324
    public function getSystemConfigSettingLabelXpath($label)
325
    {
326
        $return = sprintf($this->systemConfigSettingLabelXpath, $label);
327
        return $this->translatePlaceholders($return);
328
    }
329
330
    /**
331
     * Why is this an option?  So you can have a different theme setup for different languages and still use the same code.
332
     *
333
     * @var string
334
     */
335
336
    public $searchButtonText                         = '{{Search}}';
337
338
    /**
339
     * @return Translator
340
     */
341
    public function getTranslator()
342
    {
343
        return $this->translator;
344
    }
345
346
    /**
347
     * @return string
348
     */
349
    public function getLoginUsernameField()
350
    {
351
        return $this->translatePlaceholders($this->loginUsernameField);
352
    }
353
354
    /**
355
     * @return string
356
     */
357
    public function getLoginPasswordField()
358
    {
359
        return $this->translatePlaceholders($this->loginPasswordField);
360
    }
361
362
    /**
363
     * @return string
364
     */
365
    public function getLoginSubmitButton()
366
    {
367
        return $this->translatePlaceholders($this->loginSubmitButton);
368
    }
369
370
    /**
371
     * @return string
372
     */
373
    public function getNavigationBaseXPathSelector()
374
    {
375
        return $this->translatePlaceholders($this->navigationBaseXPathSelector);
376
    }
377
378
    /**
379
     * @return string
380
     */
381
    public function getNavigationChildXPathSelector($text)
382
    {
383
        $return = sprintf($this->navigationChildXPathSelector, $text);
384
        return $this->translatePlaceholders($return);
385
    }
386
387
    /**
388
     * @return mixed
389
     */
390
    public function getBaseUrl()
391
    {
392
        return $this->baseUrl;
393
    }
394
395
    /**
396
     * @return string
397
     */
398
    public function getSearchButtonText()
399
    {
400
        return $this->translatePlaceholders($this->searchButtonText);
401
    }
402
403
404
405
    /**
406
     * @return string
407
     */
408
    public function getSelectOrderXpath($order)
409
    {
410
        $return = sprintf($this->selectOrderXpath, $order);
411
        return $this->translatePlaceholders($return);
412
    }
413
    /**
414
     * @return string
415
     */
416
    public function getSelectCustomerXpath($value)
417
    {
418
        $xpath = sprintf($this->selectCustomerXpath, $value);
419
        return $this->translatePlaceholders($xpath);
420
    }
421
422
    /**
423
     * @return string
424
     */
425
    public function getTableButtonXpath($buttonValue)
426
    {
427
        $return = sprintf($this->tableButtonXpath, $buttonValue);
428
        return $this->translatePlaceholders($return);
429
    }
430
431
432
433
    /**
434
     * @return string
435
     */
436
    public function getTestLoggedInAtBaseUrl()
437
    {
438
        return $this->translatePlaceholders($this->testLoggedInAtBaseUrl);
439
    }
440
441
442
443
    /**
444
     * @return string
445
     */
446
    public function getSystemConfigSaveSuccessfulXpath()
447
    {
448
        return $this->translatePlaceholders($this->systemConfigSaveSuccessfulXpath);
449
    }
450
451
    /**
452
     * @return string
453
     */
454
    public function getSystemConfigurationSaveButtonXpath()
455
    {
456
        return $this->translatePlaceholders($this->systemConfigurationSaveButtonXpath);
457
    }
458
459
    /**
460
     * @return string
461
     */
462
    public function getSystemConfigSectionToggleXpath($section)
463
    {
464
        $return = sprintf($this->systemConfigSectionToggleXpath, $section);
465
        return $this->translatePlaceholders($return);
466
    }
467
468
    /**
469
     * @return string
470
     */
471
    public function getSystemConfigSectionDisplayCheckXpath($section)
472
    {
473
        $return = sprintf($this->systemConfigSectionDisplayCheckXpath, $section);
474
        return $this->translatePlaceholders($return);
475
    }
476
477
    /**
478
     * @return string
479
     */
480
    public function getSystemConfigToggleEnableXpath($section, $option)
481
    {
482
        $return = sprintf($this->systemConfigToggleEnableXpath, $section, $option);
483
        return $this->translatePlaceholders($return);
484
    }
485
486
    /**
487
     * @return string
488
     */
489
    public function getSystemConfigTabsXpath($tabName)
490
    {
491
        $return = sprintf($this->systemConfigTabsXpath, $tabName);
492
        return $this->translatePlaceholders($return);
493
    }
494
495
496
    public function getAdminPopupMessageContainerXpath()
497
    {
498
        return $this->translatePlaceholders($this->adminPopupMessageContainerXpath);
499
    }
500
501
    public function getAdminPopupMessageCloseButtonXpath()
502
    {
503
        return $this->translatePlaceholders($this->adminPopupMessageCloseButtonXpath);
504
    }
505
506
    public function getUseClicksToNavigate()
507
    {
508
        return false;
509
    }
510
511
    public function configure(AbstractTestCase $testCase)
512
    {
513
514
    }
515
516
}
517