GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 21-21 lines in 2 locations

backend/protected/modules/product/modules/import/components/exceptions/ImportModelValidateException.php 1 location

@@ 8-28 (lines=21) @@
5
 * @copyright Copyright © 2003-2015 Shogo
6
 * @license http://argilla.ru/LICENSE
7
 */
8
class ImportModelValidateException extends WarningException
9
{
10
  public function __construct(CModel $model, $message = '')
11
  {
12
    $fullMessage = empty($message) ? '' : $message.' .';
13
    $fullMessage .= 'Ошибки валидации: '.$this->clearArrayData(print_r($model->errors, true));
14
    //$message .= PHP_EOL.print_r($model->attributes, true);
15
16
    parent::__construct($fullMessage, 500);
17
  }
18
19
  private function clearArrayData($string)
20
  {
21
    $string = preg_replace('/\s+/', ' ', $string);
22
    $string = preg_replace('/\n?Array\s\(\s|\)/', '', $string);
23
    $string = preg_replace('/\s=>\s\[\d+\]/', '', $string);
24
    $string = preg_replace('/(\[\w+\])/', "\n\r$1", $string);
25
    $string = preg_replace('/\ +/', ' ', $string);
26
    return $string;
27
  }
28
}

protected/share/exception/ModelValidateException.php 1 location

@@ 8-28 (lines=21) @@
5
 * @copyright Copyright © 2003-2015 Shogo
6
 * @license http://argilla.ru/LICENSE
7
 */
8
class ModelValidateException extends CException
9
{
10
  public function __construct(CModel $model, $message = '')
11
  {
12
    $fullMessage = empty($message) ? '' : $message.' .';
13
    $fullMessage .= 'Ошибки валидации: '.$this->clearArrayData(print_r($model->errors, true));
14
    //$message .= PHP_EOL.print_r($model->attributes, true);
15
16
    parent::__construct($fullMessage, 500);
17
  }
18
19
  private function clearArrayData($string)
20
  {
21
    $string = preg_replace('/\s+/', ' ', $string);
22
    $string = preg_replace('/\n?Array\s\(\s|\)/', '', $string);
23
    $string = preg_replace('/\s=>\s\[\d+\]/', '', $string);
24
    $string = preg_replace('/(\[\w+\])/', "\n\r$1", $string);
25
    $string = preg_replace('/\ +/', ' ', $string);
26
    return $string;
27
  }
28
}