Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Number.php
Go to the documentation of this file.
1 <?php
7 
9 
13 class Number implements InterpreterInterface
14 {
20  public function evaluate(array $data)
21  {
22  if (!isset($data['value']) || !is_numeric($data['value'])) {
23  throw new \InvalidArgumentException('Numeric value is expected.');
24  }
25  $result = $data['value'];
26  return $result;
27  }
28 }