diff vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children c2387f117808
line wrap: on
line diff
--- a/vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php	Fri Feb 23 15:51:18 2018 +0000
+++ b/vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php	Fri Feb 23 15:52:07 2018 +0000
@@ -10,7 +10,6 @@
 namespace Zend\Feed\Writer\Extension\ITunes;
 
 use Zend\Feed\Writer;
-use Zend\Feed\Writer\Extension;
 use Zend\Stdlib\StringUtils;
 use Zend\Stdlib\StringWrapper\StringWrapperInterface;
 
@@ -76,7 +75,7 @@
      */
     public function setItunesBlock($value)
     {
-        if (!ctype_alpha($value) && strlen($value) > 0) {
+        if (! ctype_alpha($value) && strlen($value) > 0) {
             throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only'
             . ' contain alphabetic characters');
         }
@@ -115,7 +114,7 @@
             throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "author" may only'
             . ' contain a maximum of 255 characters each');
         }
-        if (!isset($this->data['authors'])) {
+        if (! isset($this->data['authors'])) {
             $this->data['authors'] = [];
         }
         $this->data['authors'][] = $value;
@@ -132,9 +131,9 @@
     public function setItunesDuration($value)
     {
         $value = (string) $value;
-        if (!ctype_digit($value)
-            && !preg_match("/^\d+:[0-5]{1}[0-9]{1}$/", $value)
-            && !preg_match("/^\d+:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$/", $value)
+        if (! ctype_digit($value)
+            && ! preg_match("/^\d+:[0-5]{1}[0-9]{1}$/", $value)
+            && ! preg_match("/^\d+:[0-5]{1}[0-9]{1}:[0-5]{1}[0-9]{1}$/", $value)
         ) {
             throw new Writer\Exception\InvalidArgumentException('invalid parameter: "duration" may only'
             . ' be of a specified [[HH:]MM:]SS format');
@@ -152,7 +151,7 @@
      */
     public function setItunesExplicit($value)
     {
-        if (!in_array($value, ['yes', 'no', 'clean'])) {
+        if (! in_array($value, ['yes', 'no', 'clean'])) {
             throw new Writer\Exception\InvalidArgumentException('invalid parameter: "explicit" may only'
             . ' be one of "yes", "no" or "clean"');
         }
@@ -229,14 +228,14 @@
     public function __call($method, array $params)
     {
         $point = lcfirst(substr($method, 9));
-        if (!method_exists($this, 'setItunes' . ucfirst($point))
-            && !method_exists($this, 'addItunes' . ucfirst($point))
+        if (! method_exists($this, 'setItunes' . ucfirst($point))
+            && ! method_exists($this, 'addItunes' . ucfirst($point))
         ) {
             throw new Writer\Exception\BadMethodCallException(
                 'invalid method: ' . $method
             );
         }
-        if (!array_key_exists($point, $this->data)
+        if (! array_key_exists($point, $this->data)
             || empty($this->data[$point])
         ) {
             return;