Skip to content

Commit

Permalink
Type hinting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPetterMG committed Apr 5, 2016
1 parent 462d3d3 commit 40ac4dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SitemapParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class SitemapParser
* @param array $config Configuration options
* @throws SitemapParserException
*/
public function __construct($userAgent = 'SitemapParser', $config = [])
public function __construct($userAgent = 'SitemapParser', array $config = [])
{
if (!extension_loaded('simplexml')) {
throw new SitemapParserException('The extension `simplexml` must be installed and loaded for this library');
Expand Down Expand Up @@ -140,7 +140,7 @@ public function parseRecursive($url)
*
* @param array $urlArray
*/
public function addToQueue($urlArray)
public function addToQueue(array $urlArray)
{
foreach ($urlArray as $url) {
$this->queue[] = $url;
Expand Down Expand Up @@ -252,7 +252,7 @@ protected function parseRobotstxt($robotstxt)
* @param array $array Tag array
* @return bool
*/
protected function addArray($type, $array)
protected function addArray($type, array $array)
{
if (isset($array['loc']) && filter_var($array['loc'], FILTER_VALIDATE_URL) !== false) {
switch ($type) {
Expand Down Expand Up @@ -328,7 +328,7 @@ protected function isSitemapURL($url)
* @param \SimpleXMLElement $json object
* @return bool
*/
protected function parseJson($type, $json)
protected function parseJson($type, \SimpleXMLElement $json)
{
if (!isset($json->$type)) {
return false;
Expand Down

0 comments on commit 40ac4dd

Please sign in to comment.