GoodsCarousel::getPluginInit()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hiqdev\themes\obaju\widgets;
4
5
class GoodsCarousel extends OwlCarousel
6
{
7
    public $containerOptions = ['class' => 'product-slider owl-carousel owl-theme'];
8
9
    public function getPluginInit()
10
    {
11
        return "
12
        $('.product-slider').owlCarousel({
13
            navigation: true, // Show next and prev buttons
14
            slideSpeed: 300,
15
            paginationSpeed: 400,
16
            afterInit: function() {
17
                $('.product-slider .item').css('visibility', 'visible');
18
            }
19
        });
20
        ";
21
    }
22
}
23