Skip to content

Commit

Permalink
Merge pull request awesomemotive#572 from semperfiwebdesign/scrutiniz…
Browse files Browse the repository at this point in the history
…er-patch-2

Scrutinizer Auto-Fixes
  • Loading branch information
michaeltorbert authored Oct 10, 2016
2 parents 9688b17 + 7c7f5c0 commit 414877d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions admin/aioseop_module_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function get_option_name() {

/**
* Convenience function to see if an option is set.
* @param string $option
*/
function option_isset( $option, $location = null ) {
$prefix = $this->get_prefix( $location );
Expand Down Expand Up @@ -235,6 +236,7 @@ function substr( $string, $start = 0, $length = 2147483647 ) {

/**
* Wrapper for strpos() - uses mb_strpos() if possible.
* @param string $needle
*/
function strpos( $haystack, $needle, $offset = 0 ) {
if ( function_exists( 'mb_strpos' ) ) {
Expand All @@ -246,6 +248,7 @@ function strpos( $haystack, $needle, $offset = 0 ) {

/**
* Wrapper for strrpos() - uses mb_strrpos() if possible.
* @param string $needle
*/
function strrpos( $haystack, $needle, $offset = 0 ) {
if ( function_exists( 'mb_strrpos' ) ) {
Expand Down Expand Up @@ -287,6 +290,9 @@ function xml_string_to_array( $xmlstr ) {
}
}

/**
* @param DOMElement $node
*/
function domnode_to_array( $node ) {
switch ( $node->nodeType ) {
case XML_CDATA_SECTION_NODE:
Expand Down Expand Up @@ -929,6 +935,7 @@ function get_filesystem_object() {

/**
* See if a file exists using WP Filesystem.
* @param string $filename
*/
function file_exists( $filename ) {
$wpfs = $this->get_filesystem_object();
Expand Down Expand Up @@ -1003,6 +1010,7 @@ function load_file( $filename, $use_include_path = false, $context = null, $offs

/**
* Save a file through WP Filesystem.
* @param string $filename
*/
function save_file( $filename, $contents ) {
$failed_str = __( sprintf( "Failed to write file %s!\n", $filename ), 'all-in-one-seo-pack' );
Expand All @@ -1026,6 +1034,7 @@ function save_file( $filename, $contents ) {

/**
* Delete a file through WP Filesystem.
* @param string $filename
*/
function delete_file( $filename ) {
$wpfs = $this->get_filesystem_object();
Expand All @@ -1046,6 +1055,8 @@ function delete_file( $filename ) {

/**
* Rename a file through WP Filesystem.
* @param string $filename
* @param string $newname
*/
function rename_file( $filename, $newname ) {
$wpfs = $this->get_filesystem_object();
Expand Down

0 comments on commit 414877d

Please sign in to comment.