@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $name = self::break($fullName); |
24 | 24 | |
25 | - if ($name['sobrenomes'] < 1) { |
|
25 | + if ($name['sobrenomes']<1) { |
|
26 | 26 | return false; |
27 | 27 | } |
28 | 28 |
@@ -9,15 +9,15 @@ |
||
9 | 9 | * @see https://wiki.php.net/rfc/splclassloader#example_implementation |
10 | 10 | */ |
11 | 11 | spl_autoload_register( |
12 | - function ($className) { |
|
12 | + function($className) { |
|
13 | 13 | $className = ltrim($className, '\\'); |
14 | 14 | $fileName = ''; |
15 | 15 | if ($lastNsPos = strripos($className, '\\')) { |
16 | 16 | $namespace = substr($className, 0, $lastNsPos); |
17 | - $className = substr($className, $lastNsPos + 1); |
|
18 | - $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
17 | + $className = substr($className, $lastNsPos+1); |
|
18 | + $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR; |
|
19 | 19 | } |
20 | - $fileName = __DIR__ . DIRECTORY_SEPARATOR . $fileName . $className . '.php'; |
|
20 | + $fileName = __DIR__.DIRECTORY_SEPARATOR.$fileName.$className.'.php'; |
|
21 | 21 | if (file_exists($fileName)) { |
22 | 22 | include $fileName; |
23 | 23 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | public static function isSame(string $to, string $from) |
33 | 33 | { |
34 | - return (self::toDatabase($to)===self::toDatabase($from)); |
|
34 | + return (self::toDatabase($to) === self::toDatabase($from)); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public static function isMailto($link) |
154 | 154 | { |
155 | - if (stripos($link, 'mailto:')===false) { |
|
155 | + if (stripos($link, 'mailto:') === false) { |
|
156 | 156 | return false; |
157 | 157 | } else { |
158 | 158 | return true; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | if ($base === false) { |
250 | 250 | $base = ''; |
251 | 251 | } |
252 | - $r['path'] = $base . '/' . $r['path']; |
|
252 | + $r['path'] = $base.'/'.$r['path']; |
|
253 | 253 | } |
254 | 254 | $r['path'] = self::urlRemoveDotSegments($r['path']); |
255 | 255 | return self::joinUrl($r); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | $outPath = implode('/', $outSegs); |
280 | 280 | if ($path[0] == '/') { |
281 | - $outPath = '/' . $outPath; |
|
281 | + $outPath = '/'.$outPath; |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | // compare last multi-byte character against '/' |
@@ -297,17 +297,17 @@ discard block |
||
297 | 297 | * Inspired from code available at http://nadeausoftware.com/node/79, |
298 | 298 | * Code distributed under OSI BSD (http://www.opensource.org/licenses/bsd-license.php) |
299 | 299 | */ |
300 | - public static function splitUrl($url, $decode=true) |
|
300 | + public static function splitUrl($url, $decode = true) |
|
301 | 301 | { |
302 | 302 | $parts = []; |
303 | 303 | $m = []; |
304 | 304 | $xunressub = 'a-zA-Z\d\-._~\!$&\'()*+,;='; |
305 | - $xpchar = $xunressub . ':@%'; |
|
305 | + $xpchar = $xunressub.':@%'; |
|
306 | 306 | |
307 | 307 | $xscheme = '([a-zA-Z][a-zA-Z\d+-.]*)'; |
308 | 308 | |
309 | - $xuserinfo = '(([' . $xunressub . '%]*)' . |
|
310 | - '(:([' . $xunressub . ':%]*))?)'; |
|
309 | + $xuserinfo = '((['.$xunressub.'%]*)'. |
|
310 | + '(:(['.$xunressub.':%]*))?)'; |
|
311 | 311 | |
312 | 312 | $xipv4 = '(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'; |
313 | 313 | |
@@ -316,31 +316,31 @@ discard block |
||
316 | 316 | $xhost_name = '([a-zA-Z%]+)'; |
317 | 317 | // $xhost_name = '([a-zA-Z\d-.%]+)'; @todo alterado pq tava dando erro nesse parser |
318 | 318 | |
319 | - $xhost = '(' . $xhost_name . '|' . $xipv4 . '|' . $xipv6 . ')'; |
|
319 | + $xhost = '('.$xhost_name.'|'.$xipv4.'|'.$xipv6.')'; |
|
320 | 320 | $xport = '(\d*)'; |
321 | - $xauthority = '((' . $xuserinfo . '@)?' . $xhost . |
|
322 | - '?(:' . $xport . ')?)'; |
|
321 | + $xauthority = '(('.$xuserinfo.'@)?'.$xhost. |
|
322 | + '?(:'.$xport.')?)'; |
|
323 | 323 | |
324 | - $xslash_seg = '(/[' . $xpchar . ']*)'; |
|
325 | - $xpath_authabs = '((//' . $xauthority . ')((/[' . $xpchar . ']*)*))'; |
|
326 | - $xpath_rel = '([' . $xpchar . ']+' . $xslash_seg . '*)'; |
|
327 | - $xpath_abs = '(/(' . $xpath_rel . ')?)'; |
|
328 | - $xapath = '(' . $xpath_authabs . '|' . $xpath_abs . |
|
329 | - '|' . $xpath_rel . ')'; |
|
324 | + $xslash_seg = '(/['.$xpchar.']*)'; |
|
325 | + $xpath_authabs = '((//'.$xauthority.')((/['.$xpchar.']*)*))'; |
|
326 | + $xpath_rel = '(['.$xpchar.']+'.$xslash_seg.'*)'; |
|
327 | + $xpath_abs = '(/('.$xpath_rel.')?)'; |
|
328 | + $xapath = '('.$xpath_authabs.'|'.$xpath_abs. |
|
329 | + '|'.$xpath_rel.')'; |
|
330 | 330 | |
331 | - $xqueryfrag = '([' . $xpchar . '/?' . ']*)'; |
|
331 | + $xqueryfrag = '(['.$xpchar.'/?'.']*)'; |
|
332 | 332 | |
333 | - $xurl = '^(' . $xscheme . ':)?' . $xapath . '?' . |
|
334 | - '(\?' . $xqueryfrag . ')?(#' . $xqueryfrag . ')?$'; |
|
333 | + $xurl = '^('.$xscheme.':)?'.$xapath.'?'. |
|
334 | + '(\?'.$xqueryfrag.')?(#'.$xqueryfrag.')?$'; |
|
335 | 335 | |
336 | 336 | |
337 | 337 | // Split the URL into components. |
338 | - if (!preg_match('!' . $xurl . '!', $url, $m)) { |
|
338 | + if (!preg_match('!'.$xurl.'!', $url, $m)) { |
|
339 | 339 | return false; |
340 | 340 | } |
341 | 341 | |
342 | 342 | if (!empty($m[2])) { |
343 | - $parts['scheme'] = strtolower($m[2]); |
|
343 | + $parts['scheme'] = strtolower($m[2]); |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | if (!empty($m[7])) { |
@@ -351,11 +351,11 @@ discard block |
||
351 | 351 | } |
352 | 352 | } |
353 | 353 | if (!empty($m[10])) { |
354 | - $parts['pass'] = $m[11]; |
|
354 | + $parts['pass'] = $m[11]; |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | if (!empty($m[13])) { |
358 | - $h=$parts['host'] = $m[13]; |
|
358 | + $h = $parts['host'] = $m[13]; |
|
359 | 359 | } elseif (!empty($m[14])) { |
360 | 360 | $parts['host'] = $m[14]; |
361 | 361 | } elseif (!empty($m[16])) { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $parts['query'] = $m[28]; |
380 | 380 | } |
381 | 381 | if (!empty($m[29])) { |
382 | - $parts['fragment']= $m[30]; |
|
382 | + $parts['fragment'] = $m[30]; |
|
383 | 383 | } |
384 | 384 | |
385 | 385 | if (!$decode) { |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * Inspired from code available at http://nadeausoftware.com/node/79, |
413 | 413 | * Code distributed under OSI BSD (http://www.opensource.org/licenses/bsd-license.php) |
414 | 414 | */ |
415 | - public static function joinUrl($parts, $encode=true) |
|
415 | + public static function joinUrl($parts, $encode = true) |
|
416 | 416 | { |
417 | 417 | if ($encode) { |
418 | 418 | if (isset($parts['user'])) { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | } |
436 | 436 | |
437 | 437 | if (isset($parts['query'])) { |
438 | - $parts['query'] = rawurlencode($parts['query']); |
|
438 | + $parts['query'] = rawurlencode($parts['query']); |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | if (isset($parts['fragment'])) { |
@@ -445,25 +445,25 @@ discard block |
||
445 | 445 | |
446 | 446 | $url = ''; |
447 | 447 | if (!empty($parts['scheme'])) { |
448 | - $url .= $parts['scheme'] . ':'; |
|
448 | + $url .= $parts['scheme'].':'; |
|
449 | 449 | } |
450 | 450 | if (isset($parts['host'])) { |
451 | 451 | $url .= '//'; |
452 | 452 | if (isset($parts['user'])) { |
453 | 453 | $url .= $parts['user']; |
454 | 454 | if (isset($parts['pass'])) { |
455 | - $url .= ':' . $parts['pass']; |
|
455 | + $url .= ':'.$parts['pass']; |
|
456 | 456 | } |
457 | 457 | $url .= '@'; |
458 | 458 | } |
459 | 459 | if (preg_match('!^[\da-f]*:[\da-f.:]+$!ui', $parts['host'])) { |
460 | - $url .= '[' . $parts['host'] . ']'; |
|
460 | + $url .= '['.$parts['host'].']'; |
|
461 | 461 | } // IPv6 |
462 | 462 | else { |
463 | 463 | $url .= $parts['host']; |
464 | 464 | } // IPv4 or name |
465 | 465 | if (isset($parts['port'])) { |
466 | - $url .= ':' . $parts['port']; |
|
466 | + $url .= ':'.$parts['port']; |
|
467 | 467 | } |
468 | 468 | if (!empty($parts['path']) && $parts['path'][0] != '/') { |
469 | 469 | $url .= '/'; |
@@ -473,10 +473,10 @@ discard block |
||
473 | 473 | $url .= $parts['path']; |
474 | 474 | } |
475 | 475 | if (isset($parts['query'])) { |
476 | - $url .= '?' . $parts['query']; |
|
476 | + $url .= '?'.$parts['query']; |
|
477 | 477 | } |
478 | 478 | if (isset($parts['fragment'])) { |
479 | - $url .= '#' . $parts['fragment']; |
|
479 | + $url .= '#'.$parts['fragment']; |
|
480 | 480 | } |
481 | 481 | return $url; |
482 | 482 | } |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | |
27 | 27 | public static function toUser($gender) |
28 | 28 | { |
29 | - if($gender == 'M') { |
|
29 | + if ($gender == 'M') { |
|
30 | 30 | return 'Masculino'; |
31 | 31 | } |
32 | 32 | |
33 | - if($gender == 'F') { |
|
33 | + if ($gender == 'F') { |
|
34 | 34 | return 'Feminino'; |
35 | 35 | } |
36 | 36 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public static function isSame(string $to, string $from) |
52 | 52 | { |
53 | - return (self::toDatabase($to)===self::toDatabase($from)); |
|
53 | + return (self::toDatabase($to) === self::toDatabase($from)); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | } |
@@ -312,28 +312,28 @@ discard block |
||
312 | 312 | return; |
313 | 313 | } |
314 | 314 | switch ($this->Debugoutput) { |
315 | - case 'log': |
|
316 | - //Don't output, just log |
|
317 | - error_log($str); |
|
318 | - break; |
|
319 | - case 'html': |
|
320 | - //Cleans up output a bit for a better looking, HTML-safe output |
|
321 | - echo htmlentities( |
|
322 | - preg_replace('/[\r\n]+/', '', $str), |
|
323 | - ENT_QUOTES, |
|
324 | - 'UTF-8' |
|
325 | - ) |
|
326 | - . "<br>\n"; |
|
327 | - break; |
|
328 | - case 'echo': |
|
329 | - default: |
|
330 | - //Normalize line breaks |
|
331 | - $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); |
|
332 | - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( |
|
333 | - "\n", |
|
334 | - "\n \t ", |
|
335 | - trim($str) |
|
336 | - ) . "\n"; |
|
315 | + case 'log': |
|
316 | + //Don't output, just log |
|
317 | + error_log($str); |
|
318 | + break; |
|
319 | + case 'html': |
|
320 | + //Cleans up output a bit for a better looking, HTML-safe output |
|
321 | + echo htmlentities( |
|
322 | + preg_replace('/[\r\n]+/', '', $str), |
|
323 | + ENT_QUOTES, |
|
324 | + 'UTF-8' |
|
325 | + ) |
|
326 | + . "<br>\n"; |
|
327 | + break; |
|
328 | + case 'echo': |
|
329 | + default: |
|
330 | + //Normalize line breaks |
|
331 | + $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); |
|
332 | + echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( |
|
333 | + "\n", |
|
334 | + "\n \t ", |
|
335 | + trim($str) |
|
336 | + ) . "\n"; |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | |
@@ -415,17 +415,17 @@ discard block |
||
415 | 415 | |
416 | 416 | $code = !empty($code2)?$code2:$code; |
417 | 417 | switch ($code) { |
418 | - case '250': |
|
419 | - /** |
|
418 | + case '250': |
|
419 | + /** |
|
420 | 420 | * http://www.ietf.org/rfc/rfc0821.txt |
421 | 421 | * 250 Requested mail action okay, completed |
422 | 422 | * email address was accepted |
423 | 423 | */ |
424 | - // no break |
|
425 | - case '450': |
|
426 | - case '451': |
|
427 | - case '452': |
|
428 | - /** |
|
424 | + // no break |
|
425 | + case '450': |
|
426 | + case '451': |
|
427 | + case '452': |
|
428 | + /** |
|
429 | 429 | * http://www.ietf.org/rfc/rfc0821.txt |
430 | 430 | * 450 Requested action not taken: the remote mail server |
431 | 431 | * does not want to accept mail from your server for |
@@ -436,11 +436,11 @@ discard block |
||
436 | 436 | * email address was greylisted (or some temporary error occured on the MTA) |
437 | 437 | * i believe that e-mail exists |
438 | 438 | */ |
439 | - return true; |
|
440 | - case '550': |
|
441 | - return false; |
|
442 | - default: |
|
443 | - return false; |
|
439 | + return true; |
|
440 | + case '550': |
|
441 | + return false; |
|
442 | + default: |
|
443 | + return false; |
|
444 | 444 | } |
445 | 445 | } |
446 | 446 |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | public static function isSame(string $to, string $from) |
108 | 108 | { |
109 | - return (self::toDatabase($to)===self::toDatabase($from)); |
|
109 | + return (self::toDatabase($to) === self::toDatabase($from)); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public static function validate(string $email): boolean |
119 | 119 | { |
120 | - if ((boolean) filter_var($email, FILTER_VALIDATE_EMAIL)===false) { |
|
120 | + if ((boolean) filter_var($email, FILTER_VALIDATE_EMAIL) === false) { |
|
121 | 121 | return false; |
122 | 122 | } |
123 | 123 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | public function setEmailFrom(string $email): void |
193 | 193 | { |
194 | 194 | if (!self::validate($email)) { |
195 | - $this->set_error('Invalid address : ' . $email); |
|
195 | + $this->set_error('Invalid address : '.$email); |
|
196 | 196 | $this->edebug($this->ErrorInfo); |
197 | 197 | if ($this->exceptions) { |
198 | 198 | throw new Exception($this->ErrorInfo); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function setConnectionTimeout($seconds): void |
210 | 210 | { |
211 | - if ($seconds > 0) { |
|
211 | + if ($seconds>0) { |
|
212 | 212 | $this->max_connection_timeout = (int) $seconds; |
213 | 213 | } |
214 | 214 | } |
@@ -220,14 +220,14 @@ discard block |
||
220 | 220 | */ |
221 | 221 | public function setStreamTimeout($seconds): void |
222 | 222 | { |
223 | - if ($seconds > 0) { |
|
223 | + if ($seconds>0) { |
|
224 | 224 | $this->stream_timeout = (int) $seconds; |
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
228 | 228 | public function setStreamTimeoutWait($seconds): void |
229 | 229 | { |
230 | - if ($seconds >= 0) { |
|
230 | + if ($seconds>=0) { |
|
231 | 231 | $this->stream_timeout_wait = (int) $seconds; |
232 | 232 | } |
233 | 233 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | public function isError(): boolean |
297 | 297 | { |
298 | - return ($this->error_count > 0); |
|
298 | + return ($this->error_count>0); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
@@ -329,11 +329,11 @@ discard block |
||
329 | 329 | default: |
330 | 330 | //Normalize line breaks |
331 | 331 | $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); |
332 | - echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( |
|
332 | + echo gmdate('Y-m-d H:i:s')."\t".str_replace( |
|
333 | 333 | "\n", |
334 | 334 | "\n \t ", |
335 | 335 | trim($str) |
336 | - ) . "\n"; |
|
336 | + )."\n"; |
|
337 | 337 | } |
338 | 338 | } |
339 | 339 | |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | * suppress error output from stream socket client... |
366 | 366 | * Thanks Michael. |
367 | 367 | */ |
368 | - $this->stream = @stream_socket_client("tcp://" . $host . ":" . $this->port, $errno, $errstr, $timeout); |
|
368 | + $this->stream = @stream_socket_client("tcp://".$host.":".$this->port, $errno, $errstr, $timeout); |
|
369 | 369 | if ($this->stream === false) { |
370 | 370 | if ($errno == 0) { |
371 | 371 | $this->set_error("Problem initializing the socket"); |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | return false; |
377 | 377 | } else { |
378 | - $this->edebug($host . ":" . $errstr); |
|
378 | + $this->edebug($host.":".$errstr); |
|
379 | 379 | } |
380 | 380 | } else { |
381 | 381 | stream_set_timeout($this->stream, $this->stream_timeout); |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | return false; |
401 | 401 | } |
402 | 402 | |
403 | - $this->_streamQuery("HELO " . self::parse_email($this->from)); |
|
403 | + $this->_streamQuery("HELO ".self::parse_email($this->from)); |
|
404 | 404 | $this->_streamResponse(); |
405 | 405 | $this->_streamQuery("MAIL FROM: <{$this->from}>"); |
406 | 406 | $this->_streamResponse(); |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | $this->_streamQuery("QUIT"); |
414 | 414 | fclose($this->stream); |
415 | 415 | |
416 | - $code = !empty($code2)?$code2:$code; |
|
416 | + $code = !empty($code2) ? $code2 : $code; |
|
417 | 417 | switch ($code) { |
418 | 418 | case '250': |
419 | 419 | /** |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | protected function _streamQuery($query) |
456 | 456 | { |
457 | 457 | $this->edebug($query); |
458 | - return stream_socket_sendto($this->stream, $query . self::CRLF); |
|
458 | + return stream_socket_sendto($this->stream, $query.self::CRLF); |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | /** |
@@ -474,12 +474,12 @@ discard block |
||
474 | 474 | $this->edebug("Timed out while waiting for data! (timeout {$this->stream_timeout} seconds)"); |
475 | 475 | } |
476 | 476 | |
477 | - if ($reply === false && $status['timed_out'] && $timed < $this->stream_timeout_wait) { |
|
478 | - return $this->_streamResponse($timed + $this->stream_timeout); |
|
477 | + if ($reply === false && $status['timed_out'] && $timed<$this->stream_timeout_wait) { |
|
478 | + return $this->_streamResponse($timed+$this->stream_timeout); |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | |
482 | - if ($reply !== false && $status['unread_bytes'] > 0) { |
|
482 | + if ($reply !== false && $status['unread_bytes']>0) { |
|
483 | 483 | $reply .= stream_get_line($this->stream, $status['unread_bytes'], self::CRLF); |
484 | 484 | } |
485 | 485 | $this->edebug($reply); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public static function isSame(string $to, string $from) |
30 | 30 | { |
31 | - return (self::toDatabase($to)===self::toDatabase($from)); |
|
31 | + return (self::toDatabase($to) === self::toDatabase($from)); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | } |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | public static function validate($creditCardNumber) |
23 | 23 | { |
24 | 24 | $found = false; |
25 | - foreach (self::$cardParams as $masks){ |
|
26 | - foreach ($masks as $mask){ |
|
25 | + foreach (self::$cardParams as $masks) { |
|
26 | + foreach ($masks as $mask) { |
|
27 | 27 | if (self::maskIsValidate($creditCardNumber, $mask)) { |
28 | 28 | $found = true; |
29 | 29 | } |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | |
35 | 35 | public static function expirationIsValid($mes, $ano) |
36 | 36 | { |
37 | - if ((int) Date::yearToDatabase($ano) < (int) Carbon::now()->year) { |
|
37 | + if ((int) Date::yearToDatabase($ano)<(int) Carbon::now()->year) { |
|
38 | 38 | return false; |
39 | 39 | } |
40 | 40 | if ((int) Date::yearToDatabase($ano) == (int) Carbon::now()->year) { |
41 | - if ((int) Date::monthToDatabase($mes) < (int) Carbon::now()->month) { |
|
41 | + if ((int) Date::monthToDatabase($mes)<(int) Carbon::now()->month) { |
|
42 | 42 | return false; |
43 | 43 | } |
44 | 44 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public static function isSame(string $to, string $from) |
59 | 59 | { |
60 | - return (self::toDatabase($to)===self::toDatabase($from)); |
|
60 | + return (self::toDatabase($to) === self::toDatabase($from)); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | } |
@@ -16,13 +16,13 @@ |
||
16 | 16 | if ($maskLen !== $numberLen) { |
17 | 17 | return false; |
18 | 18 | } |
19 | - while($i < $maskLen) { |
|
20 | - if (strtoupper($mask[$i])!=='X' && strtoupper($mask[$i])!=='#') { |
|
21 | - if ($mask[$i]!==$number[$i]) { |
|
19 | + while ($i<$maskLen) { |
|
20 | + if (strtoupper($mask[$i]) !== 'X' && strtoupper($mask[$i]) !== '#') { |
|
21 | + if ($mask[$i] !== $number[$i]) { |
|
22 | 22 | return false; |
23 | 23 | } |
24 | 24 | } |
25 | - $i = $i + 1; |
|
25 | + $i = $i+1; |
|
26 | 26 | } |
27 | 27 | return true; |
28 | 28 | } |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | { |
11 | 11 | $data = explode('/', $dataOriginal); |
12 | 12 | if (isset($data[2])) { |
13 | - if($data[1]>12) { |
|
14 | - return $data[2] .'-'. $data[0] .'-'. $data[1]; |
|
13 | + if ($data[1]>12) { |
|
14 | + return $data[2].'-'.$data[0].'-'.$data[1]; |
|
15 | 15 | } |
16 | - return $data[2] .'-'. $data[1] .'-'. $data[0]; |
|
16 | + return $data[2].'-'.$data[1].'-'.$data[0]; |
|
17 | 17 | } |
18 | 18 | return $dataOriginal; |
19 | 19 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | public static function isSame(string $to, string $from) |
74 | 74 | { |
75 | - return (self::toDatabase($to)===self::toDatabase($from)); |
|
75 | + return (self::toDatabase($to) === self::toDatabase($from)); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | } |