Skip to content

Commit e270985

Browse files
Lars MoellekenAlbin Kerouanton
Lars Moelleken
authored and
Albin Kerouanton
committed
Change method visibility to public in GeneratorInterface, and fix some typos
1 parent ea15bfd commit e270985

File tree

4 files changed

+35
-14
lines changed

4 files changed

+35
-14
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
* text=auto
2+
3+
/test export-ignore
4+
/.editorconfig export-ignore
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore

src/Knp/Snappy/GeneratorInterface.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface GeneratorInterface
2020
* @param array $options An array of options for this generation only
2121
* @param bool $overwrite Overwrite the file if it exists. If not, throw a FileAlreadyExistsException
2222
*/
23-
function generate($input, $output, array $options = array(), $overwrite = false);
23+
public function generate($input, $output, array $options = array(), $overwrite = false);
2424

2525
/**
2626
* Generates the output media file from the given HTML
@@ -30,7 +30,7 @@ function generate($input, $output, array $options = array(), $overwrite = false)
3030
* @param array $options An array of options for this generation only
3131
* @param bool $overwrite Overwrite the file if it exists. If not, throw a FileAlreadyExistsException
3232
*/
33-
function generateFromHtml($html, $output, array $options = array(), $overwrite = false);
33+
public function generateFromHtml($html, $output, array $options = array(), $overwrite = false);
3434

3535
/**
3636
* Returns the output of the media generated from the specified input HTML
@@ -41,7 +41,7 @@ function generateFromHtml($html, $output, array $options = array(), $overwrite =
4141
*
4242
* @return string
4343
*/
44-
function getOutput($input, array $options = array());
44+
public function getOutput($input, array $options = array());
4545

4646
/**
4747
* Returns the output of the media generated from the given HTML
@@ -51,5 +51,5 @@ function getOutput($input, array $options = array());
5151
*
5252
* @return string
5353
*/
54-
function getOutputFromHtml($html, array $options = array());
54+
public function getOutputFromHtml($html, array $options = array());
5555
}

src/Knp/Snappy/Image.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ protected function configure()
3333
'checked-svg' => null, // Use this SVG file when rendering unchecked checkboxes
3434
'cookie' => array(), // Set an additional cookie (repeatable)
3535
'cookie-jar' => null, // Read and write cookies from and to the supplied cookie jar file
36-
'crop-h' => null, // Set height for croping
37-
'crop-w' => null, // Set width for croping
38-
'crop-x' => null, // Set x coordinate for croping (default 0)
39-
'crop-y' => null, // Set y coordinate for croping (default 0)
36+
'crop-h' => null, // Set height for cropping
37+
'crop-w' => null, // Set width for cropping
38+
'crop-x' => null, // Set x coordinate for cropping (default 0)
39+
'crop-y' => null, // Set y coordinate for cropping (default 0)
4040
'custom-header' => array(), // Set an additional HTTP header (repeatable)
4141
'custom-header-propagation' => null, // Add HTTP headers specified by --custom-header for each resource request.
4242
'no-custom-header-propagation' => null, // Do not add HTTP headers specified by --custom-header for each resource request.
@@ -52,7 +52,7 @@ protected function configure()
5252
'javascript-delay' => null, // Wait some milliseconds for javascript finish (default 200)
5353
'load-error-handling' => null, // Specify how to handle pages that fail to load: abort, ignore or skip (default abort)
5454
'load-media-error-handling' => null, // Specify how to handle media files that fail to load: abort, ignore or skip (default ignore)
55-
'disable-local-file-access' => null, // Do not allowed conversion of a local file to read in other local files, unless explecitily allowed with allow
55+
'disable-local-file-access' => null, // Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with allow
5656
'enable-local-file-access' => null, // Allowed conversion of a local file to read in other local files. (default)
5757
'minimum-font-size' => null, // Minimum font size
5858
'password' => null, // HTTP Authentication password
@@ -62,14 +62,14 @@ protected function configure()
6262
'post-file' => array(), // Post an additional file
6363
'proxy' => null, // Use a proxy
6464
'quality' => null, // Output image quality (between 0 and 100) (default 94)
65-
'radiobutton-checked-svg' => null, // Use this SVG file when rendering checked radiobuttons
66-
'radiobutton-svg' => null, // Use this SVG file when rendering unchecked radiobuttons
65+
'radiobutton-checked-svg' => null, // Use this SVG file when rendering checked radio-buttons
66+
'radiobutton-svg' => null, // Use this SVG file when rendering unchecked radio-buttons
6767
'run-script' => null, // Run this additional javascript after the page is done loading (repeatable)
6868
'disable-smart-width' => null, // Use the specified width even if it is not large enough for the content
6969
'enable-smart-width' => null, // Extend --width to fit unbreakable content (default)
70-
'stop-slow-scripts' => null, // Stop slow running javascripts
71-
'no-stop-slow-scripts' => null, // Do not stop slow running javascripts (default)
72-
'transparent' => null, // Make the background transparrent in pngs *
70+
'stop-slow-scripts' => null, // Stop slow running javascript
71+
'no-stop-slow-scripts' => null, // Do not stop slow running javascript (default)
72+
'transparent' => null, // Make the background transparent in pngs *
7373
'use-xserver' => null, // Use the X server (some plugins and other stuff might not work without X11)
7474
'user-style-sheet' => null, // Specify a user style sheet, to load with every page
7575
'username' => null, // HTTP Authentication username

0 commit comments

Comments
 (0)