original_string: public function toPHP($value, Driver $driver)
      {
          if ($value === null || $value === true || $value === false) {
              return $value;
          }
  
          if (!is_numeric($value)) {
              return strtolower($value) === 'true';
          }
  
          return !empty($value);
      }
code: public function toPHP($value, Driver $driver)
      {
          if ($value === null || $value === true || $value === false) {
              return $value;
          }
  
          if (!is_numeric($value)) {
              return strtolower($value) === 'true';
          }
  
          return !empty($value);
      }
code_tokens: public function toPHP ( $ value , Driver $ driver ) { if ( $ value === null || $ value === true || $ value === false ) { return $ value ; } if ( ! is_numeric ( $ value ) ) { return strtolower ( $ value ) === 'true' ; } return ! empty ( $ value ) ; }
docstring: Convert bool values to PHP booleans
  
  @param mixed $value The value to convert.
  @param \Cake\Database\Driver $driver The driver instance to convert with.
  @return bool|null
docstring_tokens: Convert bool values to PHP booleans