@@ -174,7 +174,7 @@ |
||
| 174 | 174 | new EditInfo($this->taskName, $this->minorFlag, $this->botFlag, $this->maxLag) |
| 175 | 175 | ); |
| 176 | 176 | dump($result); |
| 177 | - echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n"; |
|
| 177 | + echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n"; |
|
| 178 | 178 | sleep(static::SLEEP_AFTER_EDITION); |
| 179 | 179 | } |
| 180 | 180 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $editInfo = new EditInfo(static::BOT_TALK_SUMMARY); |
| 64 | 64 | $success = $page->addToBottomOfThePage($addText, $editInfo); |
| 65 | 65 | |
| 66 | - return (bool)$success; |
|
| 66 | + return (bool) $success; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | throw new ConfigException('Pas de phrases disponibles pour TalkBot'); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - return (string)trim($sentences[array_rand($sentences)]); |
|
| 134 | + return (string) trim($sentences[array_rand($sentences)]); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function hasWarning(): bool |
| 25 | 25 | { |
| 26 | - return (bool)$this->warning; |
|
| 26 | + return (bool) $this->warning; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | public function processRefContent($refContent): string |
| 43 | 43 | { |
| 44 | 44 | // todo Temporary Skip URL : move where ? |
| 45 | - if(preg_match('#books\.google#', $refContent)){ |
|
| 45 | + if (preg_match('#books\.google#', $refContent)) { |
|
| 46 | 46 | return $refContent; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->xml = $xml; |
| 41 | 41 | |
| 42 | 42 | // skip multi-records |
| 43 | - $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0; |
|
| 43 | + $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0; |
|
| 44 | 44 | if (1 !== $nbResults) { |
| 45 | 45 | echo "BNF : $nbResults records (skip)\n"; |
| 46 | 46 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $res = []; |
| 124 | 124 | foreach ($elements as $element) { |
| 125 | 125 | if (isset($element) && $element instanceof SimpleXMLElement) { |
| 126 | - $res[] = (string)$element; |
|
| 126 | + $res[] = (string) $element; |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | { |
| 192 | 192 | $raw = $this->xpath2string('//mxc:datafield[@tag="215"]/mxc:subfield[@code="a"]'); |
| 193 | 193 | if (!empty($raw) && preg_match('#([0-9]{2,}) p\.#', $raw, $matches) > 0) { |
| 194 | - return (string)$matches[1]; |
|
| 194 | + return (string) $matches[1]; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | return null; |