Conditions | 1 |
Paths | 1 |
Total Lines | 64 |
Code Lines | 49 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
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:
If many parameters/temporary variables are present:
1 | <?php |
||
70 | public static function get_all_options($title, $link, $description) |
||
71 | { |
||
72 | self::set_variables($title, $link, $description); |
||
73 | self::$page_specific_data = [ |
||
74 | "email" => [ |
||
75 | "url" => "mailto:?".htmlentities("Subject=".self::$encoded_page_title."&Body=".self::$encoded_description."%0D%0A".self::$encoded_page_url), |
||
76 | "faicon" => "fa-send", |
||
77 | "title" => 'Email' |
||
78 | ], |
||
79 | "print" => [ |
||
80 | "url" => "#", |
||
81 | "faicon" => "fa-print", |
||
82 | "click" => "window.print(); return false;", |
||
83 | "title" => "Print" |
||
84 | ], |
||
85 | "favourites" => [ |
||
86 | "url" => "#", |
||
87 | "faicon" => "fa-bookmark", |
||
88 | "click" => "sharethis.bookmark('".self::$encoded_page_url."', '".self::$encoded_page_title."'); return false;", |
||
89 | "title" => "Add to favourites (Internet Explorer Only)" |
||
90 | ], |
||
91 | "delicious" => [ |
||
92 | "url" => "http://del.icio.us/post?".htmlentities("url=".self::$encoded_page_url."&title=".self::$encoded_page_title), |
||
93 | "faicon" => "fa-delicious", |
||
94 | "title" => "Delicious" |
||
95 | ], |
||
96 | "facebook" => [ |
||
97 | "url" => "http://www.facebook.com/share.php?".htmlentities("u=".self::$encoded_page_url."&title=".self::$encoded_page_title), |
||
98 | "faicon" => "fa-facebook-square", |
||
99 | "title" => "Facebook" |
||
100 | ], |
||
101 | "googleplus" => [ |
||
102 | "url" => "https://plus.google.com/share?url=".self::$encoded_page_url, |
||
103 | "faicon" => "fa-google-plus", |
||
104 | "title" => "Google Plus One" |
||
105 | ], |
||
106 | "linkedin" => [ |
||
107 | "url" => "http://www.linkedin.com/shareArticle?".htmlentities("mini=true&url=".self::$encoded_page_url."&title=".self::$encoded_page_title."&source=".Director::absoluteBaseURL()), |
||
108 | "faicon" => "fa-linkedin-square", |
||
109 | "title" => "LinkedIn" |
||
110 | ], |
||
111 | "pinterest" => [ |
||
112 | "url" => "http://pinterest.com/pin/create/bookmarklet/?".htmlentities("media=html&url=".self::$encoded_page_url."&is_video=false&description=".self::$encoded_page_title), |
||
113 | "faicon" => "fa-pinterest", |
||
114 | "title" => "Pinterest" |
||
115 | ], |
||
116 | "reddit" => [ |
||
117 | "url" => "http://reddit.com/submit?".htmlentities("url=".self::$encoded_page_url."&title=".self::$encoded_page_title), |
||
118 | "faicon" => "fa-reddit", |
||
119 | "title" => "Reddit" |
||
120 | ], |
||
121 | "twitter" => [ |
||
122 | "url" => "http://twitter.com/home?status=".htmlentities(urlencode("currently reading: ").self::$encoded_page_url), |
||
123 | "faicon" => "fa-twitter-square", |
||
124 | "title" => "Twitter" |
||
125 | ], |
||
126 | "tumblr" => [ |
||
127 | "url" => "http://www.tumblr.com/share/link?url=".htmlentities(self::$encoded_page_url."&name=".self::$encoded_page_title), |
||
128 | "faicon" => "fa-tumblr-square", |
||
129 | "title" => "Tumblr" |
||
130 | ] |
||
131 | ]; |
||
132 | |||
133 | return self::$page_specific_data; |
||
134 | } |
||
275 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths