Skip to content

Commit

Permalink
adjust @SInCE in docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
engahmeds3ed committed Feb 18, 2021
1 parent 1ff1f8b commit 43840d5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions inc/Engine/Optimization/CSSTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ protected function move( ConverterInterface $converter, $content, $source ) {
/**
* Replace local imports with their contents recursively.
*
* @since 3.8.6
*
* @param string $content CSS Content.
* @param string $target Target CSS file path.
*
Expand Down Expand Up @@ -347,6 +349,8 @@ function ( $matches ) {
/**
* Get internal file full path and contents.
*
* @since 3.8.6
*
* @param string $file Internal file path (maybe external url or relative path).
* @param string $base_path Base path as reference for relative paths.
*
Expand All @@ -357,7 +361,7 @@ private function get_internal_file_contents( $file, $base_path ) {
/**
* Filter Import external urls.
*
* @since 3.6.8
* @since 3.8.6
*
* @param bool Allow status.
* @param string $file File path/URL.
Expand All @@ -369,6 +373,7 @@ private function get_internal_file_contents( $file, $base_path ) {
return [ $file, false ];
}

// Check if this file is readable or it's relative path so we add base_path at it's start.
if ( ! rocket_direct_filesystem()->is_readable( $this->get_local_path( $file ) ) ) {
$ds = rocket_get_constant( 'DIRECTORY_SEPARATOR' );
$file = $base_path . $ds . str_replace( '/', $ds, $file );
Expand All @@ -382,7 +387,7 @@ private function get_internal_file_contents( $file, $base_path ) {
/**
* Determines if the file is external.
*
* @since 3.8
* @since 3.8.6
*
* @param string $url URL of the file.
* @return bool True if external, false otherwise.
Expand Down Expand Up @@ -439,6 +444,8 @@ protected function is_external_path( $url ) {
/**
* Get local absolute path for image.
*
* @since 3.8.6
*
* @param string $url Image url.
*
* @return string Image absolute local path.
Expand All @@ -461,6 +468,8 @@ private function get_local_path( $url ) {
/**
* Normalize relative url to full url.
*
* @since 3.8.6
*
* @param string $url Url to be normalized.
*
* @return string Normalized url.
Expand Down

0 comments on commit 43840d5

Please sign in to comment.