Browse Source

Style fixes

master
J. King 11 months ago
parent
commit
02b655f5f6
  1. 5
      .php-cs-fixer.dist.php
  2. 3
      lib/Parser.php
  3. 1
      lib/Url.php

5
.php-cs-fixer.dist.php

@ -57,7 +57,10 @@ $rules = [
// PSR standard to apply
'@PSR12' => true,
// house exceptions to PSR rules
'braces' => ['position_after_functions_and_oop_constructs' => "same"],
'curly_braces_position' => [
'functions_opening_brace' => "same_line",
'classes_opening_brace' => "same_line",
],
'function_declaration' => ['closure_function_spacing' => "none"],
'new_with_braces' => false, // no option to specify absence of braces
];

3
lib/Parser.php

@ -663,10 +663,9 @@ class Parser {
} elseif (in_array($node->localName, ["img", "area"]) && $node->hasAttribute("alt")) {
# else if img.p-x[alt] or area.p-x[alt], then return the alt attribute
return $node->getAttribute("alt");
} else {
}
# else return the textContent of the element after [cleaning]
return $this->getCleanText($node, $prefix);
}
case "u":
# To parse an element for a u-x property value (whether explicit u-* or backcompat equivalent):
if (in_array($node->localName, ["a", "area", "link"]) && $node->hasAttribute("href")) {

1
lib/Url.php

@ -4,6 +4,7 @@
* See LICENSE and AUTHORS files for details */
declare(strict_types=1);
namespace MensBeam\Microformats;
use Psr\Http\Message\UriInterface;

Loading…
Cancel
Save