Fix the following errors reported by PHP_CodeSniffer:
FILE: .../tweeper.php
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: .../src/Tweeper.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------
373 | ERROR | [x] Incorrect spacing between argument "$host" and equals sign; expected 1 but found 0
373 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$host"; expected 1 but found 0
373 | ERROR | [x] Incorrect spacing between argument "$validate_scheme" and equals sign; expected 1 but found 0
373 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$validate_scheme"; expected 1 but found 0
388 | ERROR | [x] Inline comments must start with a capital letter
388 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: .../autoload.php
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
Time: 260ms; Memory: 10Mb
/**
* @file
* Tweeper - some logic to allow tweeper to run with or without composer.
/**
* @file
* Tweeper - some logic to allow tweeper to run with or without composer.
/**
* Convert the site content to RSS.
*/
/**
* Convert the site content to RSS.
*/
- public function tweep($src_url, $host=NULL, $validate_scheme=TRUE) {
+ public function tweep($src_url, $host = NULL, $validate_scheme = TRUE) {
$url = parse_url($src_url);
if (FALSE === $url) {
trigger_error("Invalid URL: $src_url", E_USER_WARNING);
$url = parse_url($src_url);
if (FALSE === $url) {
trigger_error("Invalid URL: $src_url", E_USER_WARNING);
- // if the host is not given derive it from the URL
+ // If the host is not given derive it from the URL.
if (NULL === $host) {
if (empty($url["host"])) {
trigger_error("Invalid host in URL: $src_url", E_USER_WARNING);
if (NULL === $host) {
if (empty($url["host"])) {
trigger_error("Invalid host in URL: $src_url", E_USER_WARNING);
/**
* @file
* Tweeper - a Twitter to RSS web scraper.
/**
* @file
* Tweeper - a Twitter to RSS web scraper.