Skip to content

Commit 048af5b

Browse files
committed
Improve phpdoc for methods
1 parent 032b86c commit 048af5b

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

lib/Sabberworm/CSS/OutputFormat.php

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
use Sabberworm\CSS\Parsing\OutputException;
66

7+
/**
8+
* Class OutputFormat
9+
*
10+
* @method OutputFormat setSemicolonAfterLastRule( bool $bSemicolonAfterLastRule ) Set whether semicolons are added after last rule.
11+
*/
712
class OutputFormat {
813
/**
914
* Value format
@@ -150,17 +155,36 @@ public function getFormatter() {
150155
public function level() {
151156
return $this->iIndentationLevel;
152157
}
153-
158+
159+
/**
160+
* Create format.
161+
*
162+
* @return OutputFormat Format.
163+
*/
154164
public static function create() {
155165
return new OutputFormat();
156166
}
157-
167+
168+
/**
169+
* Create compact format.
170+
*
171+
* @return OutputFormat Format.
172+
*/
158173
public static function createCompact() {
159-
return self::create()->set('Space*Rules', "")->set('Space*Blocks', "")->setSpaceAfterRuleName('')->setSpaceBeforeOpeningBrace('')->setSpaceAfterSelectorSeparator('');
174+
$format = self::create();
175+
$format->set('Space*Rules', "")->set('Space*Blocks', "")->setSpaceAfterRuleName('')->setSpaceBeforeOpeningBrace('')->setSpaceAfterSelectorSeparator('');
176+
return $format;
160177
}
161-
178+
179+
/**
180+
* Create pretty format.
181+
*
182+
* @return OutputFormat Format.
183+
*/
162184
public static function createPretty() {
163-
return self::create()->set('Space*Rules', "\n")->set('Space*Blocks', "\n")->setSpaceBetweenBlocks("\n\n")->set('SpaceAfterListArgumentSeparator', array('default' => '', ',' => ' '));
185+
$format = self::create();
186+
$format->set('Space*Rules', "\n")->set('Space*Blocks', "\n")->setSpaceBetweenBlocks("\n\n")->set('SpaceAfterListArgumentSeparator', array('default' => '', ',' => ' '));
187+
return $format;
164188
}
165189
}
166190

0 commit comments

Comments
 (0)