Skip to content

Commit

Permalink
#2276 - Remove deprecated method isStringOperation()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Sep 18, 2021
1 parent e1b0dd1 commit 59742ce
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions Library/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Zephir;

use ReflectionException;
use Zephir\Exception\CompilerException;
use Zephir\Expression\Closure;
use Zephir\Expression\ClosureArrow;
Expand Down Expand Up @@ -200,19 +201,6 @@ public function setStringOperation($stringOperation)
$this->stringOperation = $stringOperation;
}

/**
* Checks if the result of the evaluated expression is intended to be used
* in a string operation like "concat".
*
* @deprecated
*
* @return bool
*/
public function isStringOperation()
{
return $this->stringOperation;
}

/**
* Sets if the expression is being evaluated in an evaluation like the ones in 'if' and 'while' statements.
*
Expand All @@ -226,14 +214,14 @@ public function setEvalMode($evalMode)
/**
* Compiles foo = [].
*
* @param array $expression
* @param array $expression
* @param CompilationContext $compilationContext
*
* @return CompiledExpression
*/
public function emptyArray($expression, CompilationContext $compilationContext)
public function emptyArray(array $expression, CompilationContext $compilationContext): CompiledExpression
{
/*
/**
* Resolves the symbol that expects the value
*/
if ($this->expecting) {
Expand All @@ -254,7 +242,7 @@ public function emptyArray($expression, CompilationContext $compilationContext)
throw new CompilerException('Cannot use variable: '.$symbolVariable->getName().'('.$symbolVariable->getType().') to create empty array', $expression);
}

/*
/**
* Mark the variable as an 'array'
*/
$symbolVariable->setDynamicTypes('array');
Expand All @@ -269,15 +257,14 @@ public function emptyArray($expression, CompilationContext $compilationContext)
*
* @param CompilationContext $compilationContext
*
* @throws CompilerException|Exception
*
* @return CompiledExpression
* @throws Exception
* @throws ReflectionException
*/
public function compile(CompilationContext $compilationContext): CompiledExpression
{
$expression = $this->expression;
$type = $expression['type'];
$compilableExpression = null;

switch ($type) {
case 'null':
Expand Down

0 comments on commit 59742ce

Please sign in to comment.