Completed
Push — develop ( 785f8f...33b7cf )
by greg
05:52 queued 02:39
created
src/PlaygroundCore/Filter/Slugify.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@
 block discarded – undo
51 51
                             'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',
52 52
                             'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'Ğ'=>'G', 'İ'=>'I', 'Ş'=>'S', 'ğ'=>'g', 'ı'=>'i',
53 53
                             'ş'=>'s', 'ü'=>'u', 'ă'=>'a', 'Ă'=>'A', 'ș'=>'s', 'Ș'=>'S', 'ț'=>'t', 'Ț'=>'T', 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E',
54
-                            'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8','Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P','Ρ' => 'R',
55
-                            'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W','Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y',
56
-                            'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I','Ϋ' => 'Y','α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8',
57
-                            'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p','ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y',
58
-                            'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w','ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',
59
-                            'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i', );
54
+                            'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8', 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P', 'Ρ' => 'R',
55
+                            'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W', 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y',
56
+                            'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I', 'Ϋ' => 'Y', 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8',
57
+                            'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p', 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y',
58
+                            'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w', 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',
59
+                            'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i',);
60 60
 
61 61
         $value = strtr($value, $unwanted_array);
62 62
 
Please login to merge, or discard this patch.
src/PlaygroundCore/Filter/Transliteration.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
             'ů' => 'u',
175 175
             'ý' => 'y',
176 176
             'ž' => 'z',
177
-             'Á' => 'A',
177
+                'Á' => 'A',
178 178
             'Č' => 'C',
179 179
             'Ď' => 'D',
180 180
             'É' => 'E',
Please login to merge, or discard this patch.
src/PlaygroundCore/Mapper/Formgen.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 class Formgen extends AbstractMapper
8 8
 {
9 9
     /**
10
-    * getEntityRepository : recupere l'entite formgen
11
-    *
12
-    * @return PlaygroundCore\Entity\Formgen $formgen
13
-    */
10
+     * getEntityRepository : recupere l'entite formgen
11
+     *
12
+     * @return PlaygroundCore\Entity\Formgen $formgen
13
+     */
14 14
     public function getEntityRepository()
15 15
     {
16 16
         if (null === $this->er) {
Please login to merge, or discard this patch.
src/PlaygroundCore/Mapper/Locale.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 class Locale extends AbstractMapper
8 8
 {
9 9
     /**
10
-    * getEntityRepository : recupere l'entite locale
11
-    *
12
-    * @return PlaygroundCore\Entity\Locale $locale
13
-    */
10
+     * getEntityRepository : recupere l'entite locale
11
+     *
12
+     * @return PlaygroundCore\Entity\Locale $locale
13
+     */
14 14
     public function getEntityRepository()
15 15
     {
16 16
         if (null === $this->er) {
Please login to merge, or discard this patch.
src/PlaygroundCore/Mapper/Website.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 class Website extends AbstractMapper
8 8
 {
9 9
     /**
10
-    * getEntityRepository : recupere l'entite website
11
-    *
12
-    * @return PlaygroundCore\Entity\Website $website
13
-    */
10
+     * getEntityRepository : recupere l'entite website
11
+     *
12
+     * @return PlaygroundCore\Entity\Website $website
13
+     */
14 14
     public function getEntityRepository()
15 15
     {
16 16
         if (null === $this->er) {
Please login to merge, or discard this patch.
src/PlaygroundCore/Mvc/Router/Http/RegexSlash.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $this->assembledParams = array();
46 46
 
47 47
         foreach ($mergedParams as $key => $value) {
48
-            $spec = '%' . $key . '%';
48
+            $spec = '%'.$key.'%';
49 49
 
50 50
             if (strpos($url, $spec) !== false) {
51 51
                 $url = str_replace($spec, rawurlencode($value), $url);
Please login to merge, or discard this patch.
src/PlaygroundCore/Options/ModuleOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected $bitlyUrl      = 'http://api.bit.ly/v3/shorten';
12 12
     protected $transport_class = 'Zend\Mail\Transport\File';
13 13
     protected $options_class   = 'Zend\Mail\Transport\FileOptions';
14
-    protected $options   = array('path' => 'data/mail/');
14
+    protected $options = array('path' => 'data/mail/');
15 15
     protected $twilio = array();
16 16
     protected $phpvideotoolkit = array();
17 17
     protected $quConfig = array();
Please login to merge, or discard this patch.
src/PlaygroundCore/Service/CKEditor.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * When %CKEditor is created with the editor() method, a HTML <textarea> element is created,
71 71
      * it will be displayed to anyone with JavaScript disabled or with incompatible browser.
72 72
      */
73
-    public $textareaAttributes = array( "rows" => 8, "cols" => 60 );
73
+    public $textareaAttributes = array("rows" => 8, "cols" => 60);
74 74
     /**
75 75
      * A string indicating the creation date of %CKEditor.
76 76
      * Do not change it unless you want to force browsers to not use previously cached version of %CKEditor.
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $attr = "";
132 132
         foreach ($this->textareaAttributes as $key => $val) {
133
-            $attr.= " " . $key . '="' . str_replace('"', '"', $val) . '"';
133
+            $attr .= " ".$key.'="'.str_replace('"', '"', $val).'"';
134 134
         }
135
-        $out = "<textarea name=\"" . $name . "\"" . $attr . ">" . htmlspecialchars($value) . "</textarea>\n";
135
+        $out = "<textarea name=\"".$name."\"".$attr.">".htmlspecialchars($value)."</textarea>\n";
136 136
         if (!$this->initialized) {
137 137
             $out .= $this->init();
138 138
         }
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
         } else {
231 231
             $js .= "CKEDITOR.replaceAll( function (textarea, config) {\n";
232 232
             if (!empty($className)) {
233
-                $js .= "	var classRegex = new RegExp('(?:^| )' + '". $className ."' + '(?:$| )');\n";
233
+                $js .= "	var classRegex = new RegExp('(?:^| )' + '".$className."' + '(?:$| )');\n";
234 234
                 $js .= "	if (!classRegex.test(textarea.className))\n";
235 235
                 $js .= "		return false;\n";
236 236
             }
237
-            $js .= "	CKEDITOR.tools.extend(config, ". $this->jsEncode($_config) .", true);";
237
+            $js .= "	CKEDITOR.tools.extend(config, ".$this->jsEncode($_config).", true);";
238 238
             $js .= "} );";
239 239
         }
240 240
 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                     }
411 411
                     // Return only new events
412 412
                     if (!in_array($code, $returnedEvents[$eventName])) {
413
-                        $out .= ($code ? "\n" : "") . "CKEDITOR.on('". $eventName ."', $code);";
413
+                        $out .= ($code ? "\n" : "")."CKEDITOR.on('".$eventName."', $code);";
414 414
                         $returnedEvents[$eventName][] = $code;
415 415
                     }
416 416
                 }
@@ -442,19 +442,19 @@  discard block
 block discarded – undo
442 442
         $ckeditorPath = $this->ckeditorPath();
443 443
 
444 444
         if (!empty($this->timestamp) && $this->timestamp != "%"."TIMESTAMP%") {
445
-            $args = '?t=' . $this->timestamp;
445
+            $args = '?t='.$this->timestamp;
446 446
         }
447 447
 
448 448
         // Skip relative paths...
449 449
         if (strpos($ckeditorPath, '..') !== 0) {
450
-            $out .= $this->script("window.CKEDITOR_BASEPATH='". $ckeditorPath ."';");
450
+            $out .= $this->script("window.CKEDITOR_BASEPATH='".$ckeditorPath."';");
451 451
         }
452 452
 
453
-        $out .= "<script type=\"text/javascript\" src=\"" . $ckeditorPath . 'ckeditor.js' . $args . "\"></script>\n";
453
+        $out .= "<script type=\"text/javascript\" src=\"".$ckeditorPath.'ckeditor.js'.$args."\"></script>\n";
454 454
 
455 455
         $extraCode = "";
456 456
         if ($this->timestamp != self::TIMESTAMP) {
457
-            $extraCode .= ($extraCode ? "\n" : "") . "CKEDITOR.timestamp = '". $this->timestamp ."';";
457
+            $extraCode .= ($extraCode ? "\n" : "")."CKEDITOR.timestamp = '".$this->timestamp."';";
458 458
         }
459 459
         if ($extraCode) {
460 460
             $out .= $this->script($extraCode);
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
             /**
486 486
              * realpath - Returns canonicalized absolute pathname
487 487
              */
488
-            $realPath = realpath('./') ;
488
+            $realPath = realpath('./');
489 489
         }
490 490
 
491 491
         /**
@@ -528,15 +528,15 @@  discard block
 block discarded – undo
528 528
             return str_replace(',', '.', $val);
529 529
         }
530 530
         if (is_array($val) || is_object($val)) {
531
-            if (is_array($val) && (array_keys($val) === range(0, count($val)-1))) {
532
-                return '[' . implode(',', array_map(array($this, 'jsEncode'), $val)) . ']';
531
+            if (is_array($val) && (array_keys($val) === range(0, count($val) - 1))) {
532
+                return '['.implode(',', array_map(array($this, 'jsEncode'), $val)).']';
533 533
             }
534 534
             $temp = array();
535 535
             foreach ($val as $k => $v) {
536
-                $temp[] = $this->jsEncode("{$k}") . ':' . $this->jsEncode($v);
536
+                $temp[] = $this->jsEncode("{$k}").':'.$this->jsEncode($v);
537 537
             }
538 538
 
539
-            return '{' . implode(',', $temp) . '}';
539
+            return '{'.implode(',', $temp).'}';
540 540
         }
541 541
         // String otherwise
542 542
         if (strpos($val, '@@') === 0) {
@@ -546,6 +546,6 @@  discard block
 block discarded – undo
546 546
             return $val;
547 547
         }
548 548
 
549
-        return '"' . str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val) . '"';
549
+        return '"'.str_replace(array("\\", "/", "\n", "\t", "\r", "\x08", "\x0c", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'), $val).'"';
550 550
     }
551 551
 }
Please login to merge, or discard this patch.
src/PlaygroundCore/Service/Ffmpeg.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             ->addPreInputCommand('-pattern_type', 'glob')
73 73
             ->addCommand('-i', $path)
74 74
             ->addCommand('-c:v', 'libx264')
75
-            ->addCommand('-vf', 'fps='. $fps)
75
+            ->addCommand('-vf', 'fps='.$fps)
76 76
             ->addCommand('-pix_fmt', 'yuv420p')
77 77
             ->setOutputPath($target)
78 78
             ->execute();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             ->addPreInputCommand('-pattern_type', 'glob')
105 105
             ->addCommand('-i', $path)
106 106
             ->addCommand('-vcodec', 'qtrle')
107
-            ->addCommand('-vf', 'fps='. $fps)
107
+            ->addCommand('-vf', 'fps='.$fps)
108 108
             ->setOutputPath($target)
109 109
             ->execute();
110 110
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                 $this->getServiceManager()->setShared('playgroundcore_phpvideotoolkit', false);
179 179
                 $this->getServiceManager()->get('playgroundcore_phpvideotoolkit')
180 180
                     ->addPreInputCommand('-y')
181
-                    ->addCommand('-i', 'concat:' . implode('|', $videos))
181
+                    ->addCommand('-i', 'concat:'.implode('|', $videos))
182 182
                     ->addCommand('-c', 'copy')
183 183
                     ->addCommand('-bsf:a', 'aac_adtstoasc')
184 184
                     ->addCommand('-bufsize', '1835k')
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         foreach ($layer as $k => $l) {
294 294
             $ffmpeg->addCommand('-i', $l, true);
295 295
             $overlay .= 'overlay=format=rgb';
296
-            if ($k<count($layer)-1) {
296
+            if ($k < count($layer) - 1) {
297 297
                 $overlay .= ',';
298 298
             }
299 299
         }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             $ffmpeg->addCommand('-i', $s, true);
388 388
             $concat .= '['.$k.':0]';
389 389
         }
390
-        $concat .= 'concat=n='. count($sounds) .':v=0:a=1[out]';
390
+        $concat .= 'concat=n='.count($sounds).':v=0:a=1[out]';
391 391
 
392 392
         $ffmpeg->addCommand('-filter_complex', $concat)
393 393
             ->addCommand('-map', '[out]')
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
             $ffmpeg->addCommand('-i', $s, true);
418 418
             $merge .= '['.$k.':a]';
419 419
         }
420
-        $merge .= 'amerge=inputs='. count($sounds) .'[aout]';
420
+        $merge .= 'amerge=inputs='.count($sounds).'[aout]';
421 421
 
422 422
         $ffmpeg->addCommand('-filter_complex', $merge)
423 423
             ->addCommand('-map', '[aout]')
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
     {
439 439
         $this->getServiceManager()->setShared('playgroundcore_phpvideotoolkit', false);
440 440
 
441
-        $text = "fontfile=$font:text='". $message."':fontsize=". $fontSize .":fontcolor=" . $fontColor . ":x=".$x.":y=".$y;
441
+        $text = "fontfile=$font:text='".$message."':fontsize=".$fontSize.":fontcolor=".$fontColor.":x=".$x.":y=".$y;
442 442
        
443 443
         $this->getServiceManager()->get('playgroundcore_phpvideotoolkit')
444 444
             ->addPreInputCommand('-y')
@@ -482,14 +482,14 @@  discard block
 block discarded – undo
482 482
     {
483 483
         $this->getServiceManager()->setShared('playgroundcore_phpvideotoolkit', false);
484 484
         
485
-        $i=1;
485
+        $i = 1;
486 486
         foreach ($frames as $frame) {
487 487
             $this->getServiceManager()->get('playgroundcore_phpvideotoolkit')
488 488
                 ->addPreInputCommand('-y')
489 489
                 ->addCommand('-i', $source)
490 490
                 ->addCommand('-an')
491
-                ->addCommand('-vf', 'select=between(n\,' . $frame[0] . '\,' . $frame[1] . '),setpts=PTS-STARTPTS')
492
-                ->setOutputPath($target . sprintf('s%02d', $i) . '.mov')
491
+                ->addCommand('-vf', 'select=between(n\,'.$frame[0].'\,'.$frame[1].'),setpts=PTS-STARTPTS')
492
+                ->setOutputPath($target.sprintf('s%02d', $i).'.mov')
493 493
                 ->execute();
494 494
             $i++;
495 495
         }
Please login to merge, or discard this patch.
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
         $this->getServiceManager()->setShared('playgroundcore_phpvideotoolkit', false);
200 200
        
201 201
         $this->getServiceManager()->get('playgroundcore_phpvideotoolkit')
202
-           ->addCommand('-i', $videoSource)
203
-           ->addCommand('-i', $audioSource, true)
204
-           ->setOutputPath($target)
205
-           ->execute();
202
+            ->addCommand('-i', $videoSource)
203
+            ->addCommand('-i', $audioSource, true)
204
+            ->setOutputPath($target)
205
+            ->execute();
206 206
         return $target;
207 207
     }
208 208
 
@@ -366,10 +366,10 @@  discard block
 block discarded – undo
366 366
     }
367 367
 
368 368
     /**
369
-    * This method concatenate an array of sounds
370
-    * ffmpeg -y -i in-1.wav -i in-2.wav -i in-3.wav
371
-    * -filter_complex '[0:0][1:0][2:0]concat=n=3:v=0:a=1[out]' -map '[out]' out.wav
372
-    */
369
+     * This method concatenate an array of sounds
370
+     * ffmpeg -y -i in-1.wav -i in-2.wav -i in-3.wav
371
+     * -filter_complex '[0:0][1:0][2:0]concat=n=3:v=0:a=1[out]' -map '[out]' out.wav
372
+     */
373 373
     public function concatenateSounds($sounds = array(), $target)
374 374
     {
375 375
         if (!is_array($sounds)) {
@@ -396,10 +396,10 @@  discard block
 block discarded – undo
396 396
     }
397 397
 
398 398
     /**
399
-    * This method merge an array of sounds
400
-    * ffmpeg -i in-1.wav -i in-2.wav -i in-3.wav
401
-    * -filter_complex "[0:a][1:a][2:a]amerge=inputs=3[aout]" -map "[aout]" -ac 2 out.wav
402
-    */
399
+     * This method merge an array of sounds
400
+     * ffmpeg -i in-1.wav -i in-2.wav -i in-3.wav
401
+     * -filter_complex "[0:a][1:a][2:a]amerge=inputs=3[aout]" -map "[aout]" -ac 2 out.wav
402
+     */
403 403
     public function mergeSounds($sounds = array(), $target)
404 404
     {
405 405
         if (!is_array($sounds)) {
@@ -449,9 +449,9 @@  discard block
 block discarded – undo
449 449
     }
450 450
 
451 451
     /**
452
-    *  this method extracts an image form a video at the $time second in the video.
453
-    *  ffmpeg -ss 00:00:04 -i video.mp4 -vframes 1 out.png
454
-    */
452
+     *  this method extracts an image form a video at the $time second in the video.
453
+     *  ffmpeg -ss 00:00:04 -i video.mp4 -vframes 1 out.png
454
+     */
455 455
     public function extractImage($source, $target, $start = '00:00:01', $frames = 1)
456 456
     {
457 457
         $this->getServiceManager()->setShared('playgroundcore_phpvideotoolkit', false);
@@ -472,10 +472,10 @@  discard block
 block discarded – undo
472 472
     }
473 473
 
474 474
     /**
475
-    *  this method splits a video into n chunks defined by the frames array.
476
-    *  $frames = array(array(0, 12), array(13, 110), array(111, 200));
477
-    *  ffmpeg -i quickns.mov -an -vf "select=between(n\,110\,200),setpts=PTS-STARTPTS" grg.mov
478
-    */
475
+     *  this method splits a video into n chunks defined by the frames array.
476
+     *  $frames = array(array(0, 12), array(13, 110), array(111, 200));
477
+     *  ffmpeg -i quickns.mov -an -vf "select=between(n\,110\,200),setpts=PTS-STARTPTS" grg.mov
478
+     */
479 479
     public function splitVideo($source, $frames = array(), $target)
480 480
     {
481 481
         $this->getServiceManager()->setShared('playgroundcore_phpvideotoolkit', false);
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
      * This method will merge videos in .mpg format with exactly the same codec and codec parameters :
172 172
      * http://trac.ffmpeg.org/wiki/Concatenate
173 173
      * @param  array $videos
174
-     * @return string
174
+     * @return boolean
175 175
      */
176 176
     public function mergeMpgVideos($videos = false, $target = false)
177 177
     {
Please login to merge, or discard this patch.