Code Duplication    Length = 22-22 lines in 2 locations

htdocs/class/xoopseditor/tinymce4/external_plugins/filemanager/include/php_image_magician.php 2 locations

@@ 2890-2911 (lines=22) @@
2887
2888
  ## --------------------------------------------------------
2889
2890
  private function findUnusedGreen()
2891
  # Purpose:  We find a green color suitable to use like green-screen effect.
2892
  #     Therefore, the color must not exist in the image.
2893
  {
2894
    $green = 255;
2895
2896
    do {
2897
2898
      $greenChroma = array(0, $green, 0);
2899
      $colorArray = $this->formatColor($greenChroma);
2900
      $match = $this->testColorExists($colorArray);
2901
      $green--;
2902
2903
    } while ($match == false && $green > 0);
2904
2905
    // *** If no match, just bite the bullet and use green value of 255
2906
    if (!$match) {
2907
      $greenChroma = array(0, $green, 0);
2908
    }
2909
2910
    return $greenChroma;
2911
  }
2912
2913
  ## --------------------------------------------------------
2914
@@ 2915-2936 (lines=22) @@
2912
2913
  ## --------------------------------------------------------
2914
2915
  private function findUnusedBlue()
2916
  # Purpose:  We find a green color suitable to use like green-screen effect.
2917
  #     Therefore, the color must not exist in the image.
2918
  {
2919
    $blue = 255;
2920
2921
    do {
2922
2923
      $blueChroma = array(0, 0, $blue);
2924
      $colorArray = $this->formatColor($blueChroma);
2925
      $match = $this->testColorExists($colorArray);
2926
      $blue--;
2927
2928
    } while ($match == false && $blue > 0);
2929
2930
    // *** If no match, just bite the bullet and use blue value of 255
2931
    if (!$match) {
2932
      $blueChroma = array(0, 0, $blue);
2933
    }
2934
2935
    return $blueChroma;
2936
  }
2937
2938
  ## --------------------------------------------------------
2939