comparison vendor/zendframework/zend-feed/src/Reader/Extension/Syndication/Feed.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
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
37 case 'weekly': 37 case 'weekly':
38 case 'yearly': 38 case 'yearly':
39 return $period; 39 return $period;
40 default: 40 default:
41 throw new Reader\Exception\InvalidArgumentException("Feed specified invalid update period: '$period'." 41 throw new Reader\Exception\InvalidArgumentException("Feed specified invalid update period: '$period'."
42 . " Must be one of hourly, daily, weekly or yearly" 42 . " Must be one of hourly, daily, weekly or yearly");
43 );
44 } 43 }
45 } 44 }
46 45
47 /** 46 /**
48 * Get update frequency 47 * Get update frequency
52 public function getUpdateFrequency() 51 public function getUpdateFrequency()
53 { 52 {
54 $name = 'updateFrequency'; 53 $name = 'updateFrequency';
55 $freq = $this->getData($name, 'number'); 54 $freq = $this->getData($name, 'number');
56 55
57 if (!$freq || $freq < 1) { 56 if (! $freq || $freq < 1) {
58 $this->data[$name] = 1; 57 $this->data[$name] = 1;
59 return 1; 58 return 1;
60 } 59 }
61 60
62 return $freq; 61 return $freq;
70 public function getUpdateFrequencyAsTicks() 69 public function getUpdateFrequencyAsTicks()
71 { 70 {
72 $name = 'updateFrequency'; 71 $name = 'updateFrequency';
73 $freq = $this->getData($name, 'number'); 72 $freq = $this->getData($name, 'number');
74 73
75 if (!$freq || $freq < 1) { 74 if (! $freq || $freq < 1) {
76 $this->data[$name] = 1; 75 $this->data[$name] = 1;
77 $freq = 1; 76 $freq = 1;
78 } 77 }
79 78
80 $period = $this->getUpdatePeriod(); 79 $period = $this->getUpdatePeriod();
128 return $this->data[$name]; 127 return $this->data[$name];
129 } 128 }
130 129
131 $data = $this->xpath->evaluate($type . '(' . $this->getXpathPrefix() . '/syn10:' . $name . ')'); 130 $data = $this->xpath->evaluate($type . '(' . $this->getXpathPrefix() . '/syn10:' . $name . ')');
132 131
133 if (!$data) { 132 if (! $data) {
134 $data = null; 133 $data = null;
135 } 134 }
136 135
137 $this->data[$name] = $data; 136 $this->data[$name] = $data;
138 137