Passed
Push — master ( 8fb777...a9903c )
by Sebastian
02:43
created
src/Seboettg/CiteProc/Util/StringHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public static function capitalizeForTitle($titleString)
94 94
     {
95 95
         if (preg_match('/(.+[^\<\>][\.:\/;\?\!]\s?)([a-z])(.+)/', $titleString, $match)) {
96
-            $titleString = $match[1] . StringHelper::mb_ucfirst($match[2]) . $match[3];
96
+            $titleString = $match[1].StringHelper::mb_ucfirst($match[2]).$match[3];
97 97
         }
98 98
 
99 99
         $wordArray = explode(" ", $titleString);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
         /** @noinspection PhpInternalEntityUsedInspection */
143 143
         $encoding = Mbstring::mb_detect_encoding($firstChar, self::ISO_ENCODINGS, true);
144
-        return in_array($encoding, self::ISO_ENCODINGS) ? Mbstring::mb_strtoupper($firstChar, $encoding) . $then : $firstChar . $then;
144
+        return in_array($encoding, self::ISO_ENCODINGS) ? Mbstring::mb_strtoupper($firstChar, $encoding).$then : $firstChar.$then;
145 145
     }
146 146
 
147 147
     /**
@@ -160,13 +160,13 @@  discard block
 block discarded – undo
160 160
             foreach ($spaceExploded as $givenPart) {
161 161
                 $firstLetter = mb_substr($givenPart, 0, 1, "UTF-8");
162 162
                 if (StringHelper::isLatinString($firstLetter)) {
163
-                    $res .= ctype_upper($firstLetter) ? $firstLetter . $initializeSign : " " . $givenPart . " ";
163
+                    $res .= ctype_upper($firstLetter) ? $firstLetter.$initializeSign : " ".$givenPart." ";
164 164
                 } else {
165
-                    $res .= $firstLetter . $initializeSign;
165
+                    $res .= $firstLetter.$initializeSign;
166 166
                 }
167 167
             }
168 168
             if ($i < count($exploded) - 1 && $initializeWithHyphen) {
169
-                $res = rtrim($res) . "-";
169
+                $res = rtrim($res)."-";
170 170
             }
171 171
             ++$i;
172 172
         }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     public static function replaceOuterQuotes($text, $outerOpenQuote, $outerCloseQuote, $innerOpenQuote, $innerCloseQuote)
225 225
     {
226 226
         if (preg_match("/(.*)$outerOpenQuote(.+)$outerCloseQuote(.*)/u", $text, $match)) {
227
-            return $match[1] . $innerOpenQuote . $match[2] . $innerCloseQuote . $match[3];
227
+            return $match[1].$innerOpenQuote.$match[2].$innerCloseQuote.$match[3];
228 228
         }
229 229
         return $text;
230 230
     }
@@ -254,6 +254,6 @@  discard block
 block discarded – undo
254 254
      * @return mixed
255 255
      */
256 256
     public static function removeBrackets($datePart) {
257
-        return str_replace(["[","]", "(", ")", "{", "}"], "", $datePart);
257
+        return str_replace(["[", "]", "(", ")", "{", "}"], "", $datePart);
258 258
     }
259 259
 }
260 260
\ No newline at end of file
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/Util/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
      */
55 55
     public static function create($node, $param = null)
56 56
     {
57
-        $nodeClass = self::CITE_PROC_NODE_NAMESPACE . self::$nodes[$node->getName()];
57
+        $nodeClass = self::CITE_PROC_NODE_NAMESPACE.self::$nodes[$node->getName()];
58 58
         if (!class_exists($nodeClass)) {
59
-            throw new InvalidStylesheetException("For node {$node->getName()} does not exist any counterpart class \"" . $nodeClass . "\". The given stylesheet seems to be invalid.");
59
+            throw new InvalidStylesheetException("For node {$node->getName()} does not exist any counterpart class \"".$nodeClass."\". The given stylesheet seems to be invalid.");
60 60
         }
61 61
         if ($param != null) {
62 62
             return new $nodeClass($node, $param);
Please login to merge, or discard this patch.
src/Seboettg/CiteProc/StyleSheet.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public static function loadStyleSheet($styleName)
36 36
     {
37
-        $stylesPath = self::vendorPath() . "/citation-style-language/styles-distribution/";
38
-        return file_get_contents($stylesPath . $styleName . '.csl');
37
+        $stylesPath = self::vendorPath()."/citation-style-language/styles-distribution/";
38
+        return file_get_contents($stylesPath.$styleName.'.csl');
39 39
     }
40 40
 
41 41
     /**
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
     public static function loadLocales($langKey)
49 49
     {
50 50
         $data = null;
51
-        $localesPath = self::vendorPath() . "/citation-style-language/locales/";
52
-        $localeFile = $localesPath . "locales-" . $langKey . '.xml';
51
+        $localesPath = self::vendorPath()."/citation-style-language/locales/";
52
+        $localeFile = $localesPath."locales-".$langKey.'.xml';
53 53
         if (file_exists($localeFile)) {
54 54
             $data = file_get_contents($localeFile);
55 55
         } else {
56 56
             $metadata = self::loadLocalesMetadata();
57 57
             if (!empty($metadata->{'primary-dialects'}->{$langKey})) {
58
-                $data = file_get_contents($localesPath . "locales-" . $metadata->{'primary-dialects'}->{$langKey} . '.xml');
58
+                $data = file_get_contents($localesPath."locales-".$metadata->{'primary-dialects'}->{$langKey}.'.xml');
59 59
             }
60 60
         }
61 61
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public static function loadLocalesMetadata()
70 70
     {
71
-        $localesMetadataPath = self::vendorPath() . "/citation-style-language/locales/locales.json";
71
+        $localesMetadataPath = self::vendorPath()."/citation-style-language/locales/locales.json";
72 72
         return json_decode(file_get_contents($localesMetadataPath));
73 73
     }
74 74
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     private static function vendorPath()
80 80
     {
81
-        include_once __DIR__ . '/../../../vendorPath.php';
81
+        include_once __DIR__.'/../../../vendorPath.php';
82 82
         if (!($vendorPath = vendorPath())) {
83 83
             // @codeCoverageIgnoreStart
84 84
             throw new CiteProcException('vendor path not found. Use composer to initialize your project');
Please login to merge, or discard this patch.