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 ( 228e27...d5b0c7 )
by Kevin
05:38 queued 02:51
created

getOrderCancelledMessageXpath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
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
    /**
84
     * @return string
85
     */
86
    public function getOrderCancelledMessageXpath()
87
    {
88
        return $this->translatePlaceholders($this->orderCancelledMessageXpath);
89
    }
90
91
92
93
    /**
94
     * @return string
95
     */
96
    public function getFirstTermsRowXpath()
97
    {
98
        return $this->firstTermsRowXpath;
99
    }
100
101
    /**
102
     * @return string
103
     */
104
    public function getCacheSubmitXpath()
105
    {
106
        return $this->translatePlaceholders($this->cacheSubmitXpath);
107
    }
108
109
110
111
    /**
112
     * @return string
113
     */
114
    public function getCacheMassActionOptionXpath($option)
115
    {
116
        $xpath = sprintf($this->cacheMassActionOptionXpath, $option);
117
        return $this->translatePlaceholders($xpath);
118
    }
119
120
121
122
    /**
123
     * @return string
124
     */
125
    public function getCacheAllTargetsXpath()
126
    {
127
        return $this->translatePlaceholders($this->cacheAllTargetsXpath);
128
    }
129
130
131
132
    /**
133
     * @return string
134
     */
135
    public function getCacheTargetXpath($type)
136
    {
137
        $xpath = sprintf($this->cacheTargetXpath, $type);
138
        return $this->translatePlaceholders($xpath);
139
    }
140
141
142
143
    /**
144
     * @return string
145
     */
146
    public function getCacheNavigationPath()
147
    {
148
        return $this->translatePlaceholders($this->cacheNavigationPath);
149
    }
150
151
152
    public function getFormButtonXpath($button)
153
    {
154
        $xpath = sprintf($this->formButtonXpath, $button);
155
        return $this->translatePlaceholders($xpath);
156
    }
157
158
    /**
159
     * @return string
160
     */
161
    public function getShippingCarrierXpath($count)
162
    {
163
        $xpath = sprintf($this->shippingCarrierXpath, $count);
164
        return $xpath;
165
    }
166
167
    /**
168
     * @return string
169
     */
170
    public function getShippingTitleXpath($count)
171
    {
172
        $xpath = sprintf($this->shippingTitleXpath, $count);
173
        return $xpath;
174
    }
175
176
    /**
177
     * @return string
178
     */
179
    public function getShippingTrackingNumberXpath($count)
180
    {
181
        $xpath = sprintf($this->shippingTrackingNumberXpath, $count);
182
        return $xpath;
183
    }
184
185
186
187
    /**
188
     * @return string
189
     */
190
    public function getXTreeChildNodeExpandPrefixXpath()
191
    {
192
        return $this->translatePlaceholders($this->xTreeChildNodeExpandPrefixXpath);
193
    }
194
195
    /**
196
     * @return string
197
     */
198
    public function getXTreeNamedRootXpath($category)
199
    {
200
        $xpath = sprintf($this->xTreeNamedRootXpath, $category);
201
        return $this->translatePlaceholders($xpath);
202
    }
203
204
205
206
207
    /**
208
     * @return string
209
     */
210
    public function getXTreeChildNodePrefixXpath()
211
    {
212
        return $this->translatePlaceholders($this->xTreeChildNodePrefixXpath);
213
    }
214
215
    /**
216
     * @return string
217
     */
218
    public function getXTreeChildXpath($name)
219
    {
220
        $xpath = sprintf($this->xTreeChildXpath, $name);
221
        return $this->translatePlaceholders($xpath);
222
    }
223
224
    /**
225
     * @return string
226
     */
227
    public function getXTreeRootXpath()
228
    {
229
        return $this->translatePlaceholders($this->xTreeRootXpath);
230
    }
231
232
233
234
    public function set($name, $value)
235
    {
236
        $this->$name = $value;
237
    }
238
239
    /**
240
     * @return string
241
     */
242
    public function getSuccessfulActionXpath()
243
    {
244
        return $this->successfulActionXpath;
245
    }
246
247
    /**
248
     * @return string
249
     */
250
    public function getErrorActionXpath()
251
    {
252
        return $this->errorActionXpath;
253
    }
254
255
256
257
    /**
258
     * @return string
259
     */
260
    public function getWidgetActionButtonXpath($label)
261
    {
262
        return $this->translatePlaceholders(sprintf($this->widgetActionButtonXpath, $label));
263
    }
264
265
    /**
266
     * @return string
267
     */
268
    public function getWidgetAttributeByLabelXpath($attribute)
269
    {
270
        return $this->translatePlaceholders(sprintf($this->widgetAttributeByLabelXpath, $attribute, $attribute, $attribute, $attribute));
271
    }
272
273
274
275
    /**
276
     * @return string
277
     */
278
    public function getWidgetTabHeaderXpath($name)
279
    {
280
        return $this->translatePlaceholders(sprintf($this->widgetTabHeaderXpath, $name));
281
    }
282
283
    /**
284
     * @return string
285
     */
286
    public function getWidgetTabXpath($name)
287
    {
288
        return $this->translatePlaceholders(sprintf($this->widgetTabXpath, $name));
289
    }
290
291
292
293
    public function getGuaranteedPageLoadedElementDisplayedXpath()
294
    {
295
        return $this->translatePlaceholders($this->guaranteedPageLoadedElementDisplayedXpath);
296
    }
297
298
    /**
299
     * @param mixed $guaranteedPageLoadedElementDisplayedXpath
300
     */
301
    public function setGuaranteedPageLoadedElementDisplayedXpath($guaranteedPageLoadedElementDisplayedXpath)
302
    {
303
        $this->guaranteedPageLoadedElementDisplayedXpath = $guaranteedPageLoadedElementDisplayedXpath;
304
    }
305
306
    /**
307
     * @return string
308
     */
309
    public function getHomeXpath()
310
    {
311
        return $this->homeXpath;
312
    }
313
314
    /**
315
     * @return string
316
     */
317
    public function getSystemConfigSettingLabelXpath($label)
318
    {
319
        $return = sprintf($this->systemConfigSettingLabelXpath, $label);
320
        return $this->translatePlaceholders($return);
321
    }
322
323
    /**
324
     * Why is this an option?  So you can have a different theme setup for different languages and still use the same code.
325
     *
326
     * @var string
327
     */
328
329
    public $searchButtonText                         = '{{Search}}';
330
331
    /**
332
     * @return Translator
333
     */
334
    public function getTranslator()
335
    {
336
        return $this->translator;
337
    }
338
339
    /**
340
     * @return string
341
     */
342
    public function getLoginUsernameField()
343
    {
344
        return $this->translatePlaceholders($this->loginUsernameField);
345
    }
346
347
    /**
348
     * @return string
349
     */
350
    public function getLoginPasswordField()
351
    {
352
        return $this->translatePlaceholders($this->loginPasswordField);
353
    }
354
355
    /**
356
     * @return string
357
     */
358
    public function getLoginSubmitButton()
359
    {
360
        return $this->translatePlaceholders($this->loginSubmitButton);
361
    }
362
363
    /**
364
     * @return string
365
     */
366
    public function getNavigationBaseXPathSelector()
367
    {
368
        return $this->translatePlaceholders($this->navigationBaseXPathSelector);
369
    }
370
371
    /**
372
     * @return string
373
     */
374
    public function getNavigationChildXPathSelector($text)
375
    {
376
        $return = sprintf($this->navigationChildXPathSelector, $text);
377
        return $this->translatePlaceholders($return);
378
    }
379
380
    /**
381
     * @return mixed
382
     */
383
    public function getBaseUrl()
384
    {
385
        return $this->baseUrl;
386
    }
387
388
    /**
389
     * @return string
390
     */
391
    public function getSearchButtonText()
392
    {
393
        return $this->translatePlaceholders($this->searchButtonText);
394
    }
395
396
397
398
    /**
399
     * @return string
400
     */
401
    public function getSelectOrderXpath($order)
402
    {
403
        $return = sprintf($this->selectOrderXpath, $order);
404
        return $this->translatePlaceholders($return);
405
    }
406
    /**
407
     * @return string
408
     */
409
    public function getSelectCustomerXpath($value)
410
    {
411
        $xpath = sprintf($this->selectCustomerXpath, $value);
412
        return $this->translatePlaceholders($xpath);
413
    }
414
415
    /**
416
     * @return string
417
     */
418
    public function getTableButtonXpath($buttonValue)
419
    {
420
        $return = sprintf($this->tableButtonXpath, $buttonValue);
421
        return $this->translatePlaceholders($return);
422
    }
423
424
425
426
    /**
427
     * @return string
428
     */
429
    public function getTestLoggedInAtBaseUrl()
430
    {
431
        return $this->translatePlaceholders($this->testLoggedInAtBaseUrl);
432
    }
433
434
435
436
    /**
437
     * @return string
438
     */
439
    public function getSystemConfigSaveSuccessfulXpath()
440
    {
441
        return $this->translatePlaceholders($this->systemConfigSaveSuccessfulXpath);
442
    }
443
444
    /**
445
     * @return string
446
     */
447
    public function getSystemConfigurationSaveButtonXpath()
448
    {
449
        return $this->translatePlaceholders($this->systemConfigurationSaveButtonXpath);
450
    }
451
452
    /**
453
     * @return string
454
     */
455
    public function getSystemConfigSectionToggleXpath($section)
456
    {
457
        $return = sprintf($this->systemConfigSectionToggleXpath, $section);
458
        return $this->translatePlaceholders($return);
459
    }
460
461
    /**
462
     * @return string
463
     */
464
    public function getSystemConfigSectionDisplayCheckXpath($section)
465
    {
466
        $return = sprintf($this->systemConfigSectionDisplayCheckXpath, $section);
467
        return $this->translatePlaceholders($return);
468
    }
469
470
    /**
471
     * @return string
472
     */
473
    public function getSystemConfigToggleEnableXpath($section, $option)
474
    {
475
        $return = sprintf($this->systemConfigToggleEnableXpath, $section, $option);
476
        return $this->translatePlaceholders($return);
477
    }
478
479
    /**
480
     * @return string
481
     */
482
    public function getSystemConfigTabsXpath($tabName)
483
    {
484
        $return = sprintf($this->systemConfigTabsXpath, $tabName);
485
        return $this->translatePlaceholders($return);
486
    }
487
488
489
    public function getAdminPopupMessageContainerXpath()
490
    {
491
        return $this->translatePlaceholders($this->adminPopupMessageContainerXpath);
492
    }
493
494
    public function getAdminPopupMessageCloseButtonXpath()
495
    {
496
        return $this->translatePlaceholders($this->adminPopupMessageCloseButtonXpath);
497
    }
498
499
    public function getUseClicksToNavigate()
500
    {
501
        return false;
502
    }
503
504
    public function configure(AbstractTestCase $testCase)
505
    {
506
507
    }
508
509
}
510