public function getTransferDataProvider() { $result = ['success' => null, 'error' => null]; $this->domains = trim($this->domains); $list = ArrayHelper::csplit($this->domains, "\n"); foreach ($list as $key => $value) { $strCheck .= "\n{$value}"; $strCheck = trim($strCheck); preg_match("/^([a-z0-9][0-9a-z.-]+)( +|\t+|,|;)(.*)/i", $value, $matches); if ($matches) { $domain = check::domain(trim(strtolower($matches[1]))); if ($domain) { $password = check::password(trim($matches[3])); if ($password) { $doms[$domain] = compact('domain', 'password'); } else { $dom2err[$domain] = 'wrong input password'; } } else { $dom2err[$value] = 'unknown error'; } } else { $dom2err[$value] = 'empty code'; } } return $result; }