Skip to content

Commit

Permalink
Less_Parser: Rename private methods to match our current conventions
Browse files Browse the repository at this point in the history
Change-Id: I1bccc6c2331978f00af720c6bec8020e2aac9bd2
  • Loading branch information
Hannah Okwelum authored and Krinkle committed May 30, 2024
1 parent 74d8df9 commit fc812bd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Less/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,17 +622,17 @@ private function _parse( $file_path = null ) {
* @param string|null $file_path
*/
private function GetRules( $file_path ) {
$this->SetInput( $file_path );
$this->setInput( $file_path );

$cache_file = $this->CacheFile( $file_path );
$cache_file = $this->cacheFile( $file_path );
if ( $cache_file ) {
if ( self::$options['cache_method'] == 'callback' ) {
$callback = self::$options['cache_callback_get'];
if ( is_callable( $callback ) ) {
$cache = $callback( $this, $file_path, $cache_file );

if ( $cache ) {
$this->UnsetInput();
$this->unsetInput();
return $cache;
}
}
Expand All @@ -645,7 +645,7 @@ private function GetRules( $file_path ) {
$cache = unserialize( file_get_contents( $cache_file ) );
if ( $cache ) {
touch( $cache_file );
$this->UnsetInput();
$this->unsetInput();
return $cache;
}
break;
Expand All @@ -659,7 +659,7 @@ private function GetRules( $file_path ) {
throw new Less_Exception_Chunk( $this->input, null, $this->furthest, $this->env->currentFileInfo );
}

$this->UnsetInput();
$this->unsetInput();

// save the cache
if ( $cache_file ) {
Expand All @@ -685,7 +685,7 @@ private function GetRules( $file_path ) {
/**
* @internal since 4.3.0 No longer a public API.
*/
private function SetInput( $file_path ) {
private function setInput( $file_path ) {
// Set up the input buffer
if ( $file_path ) {
$this->input = file_get_contents( $file_path );
Expand All @@ -706,7 +706,7 @@ private function SetInput( $file_path ) {
/**
* @internal since 4.3.0 No longer a public API.
*/
private function UnsetInput() {
private function unsetInput() {
// Free up some memory
$this->input = $this->pos = $this->input_len = $this->furthest = null;
$this->saveStack = [];
Expand All @@ -715,7 +715,7 @@ private function UnsetInput() {
/**
* @internal since 4.3.0 Use Less_Cache instead.
*/
private function CacheFile( $file_path ) {
private function cacheFile( $file_path ) {
if ( $file_path && $this->CacheEnabled() ) {

$env = get_object_vars( $this->env );
Expand Down

0 comments on commit fc812bd

Please sign in to comment.