Skip to content

Commit 65e64cc

Browse files
Function comments
1 parent a2aed0f commit 65e64cc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/FontAwesomeSVG.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ public function get_svg($id, $opts=false) {
8585

8686

8787
/**
88+
* Get an icon's details from icon ID
8889
*
90+
* @param string $id icon ID e.g. fas fa-house
91+
* @return array
8992
*/
9093
public function get_icon_details($id) {
9194
$icon = array();
@@ -109,10 +112,13 @@ public function get_icon_details($id) {
109112

110113

111114
/**
115+
* Get the directory that contains the SVG icon file
112116
*
117+
* @param string $style
118+
* @return string
113119
*/
114-
public function get_icon_dir($iconID) {
115-
switch($iconID) {
120+
public function get_icon_dir($style) {
121+
switch($style) {
116122
case 'fas':
117123
$dir = 'solid';
118124
break;
@@ -140,7 +146,10 @@ public function get_icon_dir($iconID) {
140146

141147

142148
/**
149+
* Get the icon's SVG file name
143150
*
151+
* @param string $icon_name
152+
* @return string
144153
*/
145154
public function get_icon_filename($icon_name) {
146155
return str_replace('fa-', '', $icon_name);

0 commit comments

Comments
 (0)