Completed
Push — master ( d57f7c...e95de4 )
by Iman
02:08
created

ForeverWidget::data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Widgets\Foo {
4
    class Widget1
5
    {
6
        public function data()
7
        {
8
        }
9
    }
10
}
11
12
namespace {
13
14
    class ForeverWidget
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
15
    {
16
        public $cacheLifeTime = -1;
17
        public $template = 'hello';
18
19
        public function data()
20
        {
21
        }
22
    }
23
24
    class CustomCacheKeyWidget
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
25
    {
26
        public $cacheLifeTime = -1;
27
        public $template = 'hello';
28
29
        public function data()
30
        {
31
        }
32
33
        public function cacheKey()
34
        {
35
            return 'abcde';
36
        }
37
    }
38
39
    class ForeverWidget2
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
40
    {
41
        public $cacheLifeTime = 'forever';
42
        public $template = 'hello';
43
44
        public function data()
45
        {
46
        }
47
    }
48
49
    class Widget1
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
50
    {
51
        //    public $cacheLifeTime = -1;
0 ignored issues
show
Unused Code Comprehensibility introduced by
40% 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...
52
        public $template = 'hello';
53
54
        public function data()
55
        {
56
        }
57
    }
58
59
    class TaggedWidget
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
60
    {
61
        public $template = 'hello';
62
        public $cacheTags = ['t1', 't2'];
63
64
        public function data()
65
        {
66
        }
67
    }
68
69
    class Widget2
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
70
    {
71
        //    public $cacheLifeTime = 'forever';
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...
72
73
        public function data()
74
        {
75
        }
76
    }
77
78
    class Widget3
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
79
    {
80
        public $template = 'hello';
81
        public $contextAs = '$myData';
82
83
        public function data()
84
        {
85
        }
86
    }
87
88
    class Widget4
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
89
    {
90
        public $template = 'hello';
91
        public $controller = 'Widget4Ctrl';
92
    }
93
94
    class Widget4Ctrl
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
95
    {
96
        public function data($arg1, $arg2)
97
        {
98
            return $arg1.$arg2;
99
        }
100
    }
101
102
    class Widget5
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
103
    {
104
        public $template = 'hello';
105
        public $presenter = 'Widget5Presenter';
106
107
        public function data()
108
        {
109
            return 'foo';
110
        }
111
    }
112
113
    class Widget5Presenter
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
114
    {
115
        public function present($data)
116
        {
117
            return 'bar'.$data;
118
        }
119
    }
120
121
    class Widget6
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
122
    {
123
        public $template = 'hello';
124
125
        public function data($foo, $bar)
126
        {
127
            return $bar.$foo;
128
        }
129
    }
130
131
    class Widget7
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
132
    {
133
        public $template = 'hello';
134
135
        public function data()
136
        {
137
        }
138
    }
139
}
140