@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $editInfo = new EditInfo(static::BOT_TALK_SUMMARY); |
59 | 59 | $success = $page->addToBottomOfThePage($addText, $editInfo); |
60 | 60 | |
61 | - return (bool)$success; |
|
61 | + return (bool) $success; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return null; |
87 | 87 | } |
88 | 88 | |
89 | - return (string)trim($sentences[array_rand($sentences)]); |
|
89 | + return (string) trim($sentences[array_rand($sentences)]); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -88,7 +88,7 @@ |
||
88 | 88 | // const TRADE = '™'; // ™ |
89 | 89 | // const REG = '®'; // ® |
90 | 90 | // const COPY = '©'; // © |
91 | - const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s |
|
91 | + const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * UTF8 first letter in upper case. |
@@ -111,7 +111,7 @@ |
||
111 | 111 | { |
112 | 112 | // Style "auto1234" |
113 | 113 | if (empty($this->getParam('périodique') || empty($this->getParam('date')))) { |
114 | - return 'auto'.(string)rand(1000, 9999); |
|
114 | + return 'auto'.(string) rand(1000, 9999); |
|
115 | 115 | } |
116 | 116 | // Style "LeMonde15022017" |
117 | 117 | $periodique = str_replace( |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | public function process($data): array |
24 | 24 | { |
25 | - if(!isset($data['JSON-LD'])) { |
|
25 | + if (!isset($data['JSON-LD'])) { |
|
26 | 26 | return []; |
27 | 27 | } |
28 | 28 | $data = $data['JSON-LD']; |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | public function process($data): array |
23 | 23 | { |
24 | - if(!isset($data['JSON-LD'])) { |
|
24 | + if (!isset($data['JSON-LD'])) { |
|
25 | 25 | return []; |
26 | 26 | } |
27 | 27 | $ld = $data['JSON-LD']; |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * @var AbstractWikiTemplate |
54 | 54 | */ |
55 | - try{ |
|
55 | + try { |
|
56 | 56 | $tplObject = WikiTemplateFactory::create($tplName); |
57 | - }catch (\Throwable $e){ |
|
57 | + } catch (\Throwable $e) { |
|
58 | 58 | unset($e); |
59 | 59 | continue; |
60 | 60 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | ) { |
190 | 190 | array_walk( |
191 | 191 | $matches, |
192 | - function (&$value) { |
|
192 | + function(&$value) { |
|
193 | 193 | $value = str_replace(['CURLYBRACKETO', 'CURLYBRACKETC'], ['{', '}'], $value); |
194 | 194 | } |
195 | 195 | ); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | try{ |
56 | 56 | $tplObject = WikiTemplateFactory::create($tplName); |
57 | - }catch (\Throwable $e){ |
|
57 | + } catch (\Throwable $e){ |
|
58 | 58 | unset($e); |
59 | 59 | continue; |
60 | 60 | } |
@@ -69,13 +69,13 @@ |
||
69 | 69 | private $dataAnalysis; |
70 | 70 | |
71 | 71 | public function __construct(DbAdapter $dbAdapter, Bot $bot, Memory $memory, RefGoogleBook $refGoogleBook, |
72 | - ?DataAnalysis $dataAnalysis=null) |
|
72 | + ?DataAnalysis $dataAnalysis = null) |
|
73 | 73 | { |
74 | 74 | $this->db = $dbAdapter; |
75 | 75 | $this->bot = $bot; |
76 | 76 | $this->memory = $memory; |
77 | 77 | $this->refGooConverter = $refGoogleBook; |
78 | - if($dataAnalysis) { |
|
78 | + if ($dataAnalysis) { |
|
79 | 79 | $this->dataAnalysis = $dataAnalysis; |
80 | 80 | } |
81 | 81 |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | } catch (Throwable $e) { |
215 | 215 | unset($e); |
216 | 216 | // hack : 1 => "ouvrage collectif" |
217 | - $name = (string)$name; |
|
217 | + $name = (string) $name; |
|
218 | 218 | $this->log[] = "parameter $name not found"; |
219 | 219 | $this->parametersErrorFromHydrate[$name] = $value; |
220 | 220 | |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | { |
274 | 274 | // todo verify/useless ? |
275 | 275 | if (is_int($name)) { |
276 | - $name = (string)$name; |
|
276 | + $name = (string) $name; |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | // that parameter exists in template ? |
@@ -52,7 +52,7 @@ |
||
52 | 52 | { |
53 | 53 | $data = $this->getFileData(); |
54 | 54 | $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE)); |
55 | - $this->count = (int)$data['count']; |
|
55 | + $this->count = (int) $data['count']; |
|
56 | 56 | |
57 | 57 | // Today reboot date/time of the quota |
58 | 58 | $todayBoot = new DateTime(); |