code: public function isEmpty($value, $trim = false)
      {
          $value = is_array($value) ? reset($value) : $value;
          return !($value instanceof UploadedFile) || $value->error == UPLOAD_ERR_NO_FILE;
      }
docs: {@inheritdoc}
  @param bool $trim