Completed
Push — develop ( e19ce2...317109 )
by Zack
32:08 queued 12:09
created
vendor/psr/log/Psr/Log/LoggerTrait.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
  * reduce boilerplate code that a simple Logger that does the same thing with
17 17
  * messages regardless of the error level has to implement.
18 18
  */
19
-trait LoggerTrait
20
-{
19
+trait LoggerTrait {
21 20
     /**
22 21
      * System is unusable.
23 22
      *
@@ -26,8 +25,7 @@  discard block
 block discarded – undo
26 25
      *
27 26
      * @return void
28 27
      */
29
-    public function emergency($message, array $context = array())
30
-    {
28
+    public function emergency($message, array $context = array()) {
31 29
         $this->log(LogLevel::EMERGENCY, $message, $context);
32 30
     }
33 31
 
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
      *
43 41
      * @return void
44 42
      */
45
-    public function alert($message, array $context = array())
46
-    {
43
+    public function alert($message, array $context = array()) {
47 44
         $this->log(LogLevel::ALERT, $message, $context);
48 45
     }
49 46
 
@@ -57,8 +54,7 @@  discard block
 block discarded – undo
57 54
      *
58 55
      * @return void
59 56
      */
60
-    public function critical($message, array $context = array())
61
-    {
57
+    public function critical($message, array $context = array()) {
62 58
         $this->log(LogLevel::CRITICAL, $message, $context);
63 59
     }
64 60
 
@@ -71,8 +67,7 @@  discard block
 block discarded – undo
71 67
      *
72 68
      * @return void
73 69
      */
74
-    public function error($message, array $context = array())
75
-    {
70
+    public function error($message, array $context = array()) {
76 71
         $this->log(LogLevel::ERROR, $message, $context);
77 72
     }
78 73
 
@@ -87,8 +82,7 @@  discard block
 block discarded – undo
87 82
      *
88 83
      * @return void
89 84
      */
90
-    public function warning($message, array $context = array())
91
-    {
85
+    public function warning($message, array $context = array()) {
92 86
         $this->log(LogLevel::WARNING, $message, $context);
93 87
     }
94 88
 
@@ -100,8 +94,7 @@  discard block
 block discarded – undo
100 94
      *
101 95
      * @return void
102 96
      */
103
-    public function notice($message, array $context = array())
104
-    {
97
+    public function notice($message, array $context = array()) {
105 98
         $this->log(LogLevel::NOTICE, $message, $context);
106 99
     }
107 100
 
@@ -115,8 +108,7 @@  discard block
 block discarded – undo
115 108
      *
116 109
      * @return void
117 110
      */
118
-    public function info($message, array $context = array())
119
-    {
111
+    public function info($message, array $context = array()) {
120 112
         $this->log(LogLevel::INFO, $message, $context);
121 113
     }
122 114
 
@@ -128,8 +120,7 @@  discard block
 block discarded – undo
128 120
      *
129 121
      * @return void
130 122
      */
131
-    public function debug($message, array $context = array())
132
-    {
123
+    public function debug($message, array $context = array()) {
133 124
         $this->log(LogLevel::DEBUG, $message, $context);
134 125
     }
135 126
 
Please login to merge, or discard this patch.
vendor/psr/log/Psr/Log/Test/TestLogger.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @method bool hasInfoThatPasses($message)
61 61
  * @method bool hasDebugThatPasses($message)
62 62
  */
63
-class TestLogger extends AbstractLogger
64
-{
63
+class TestLogger extends AbstractLogger {
65 64
     /**
66 65
      * @var array
67 66
      */
@@ -72,8 +71,7 @@  discard block
 block discarded – undo
72 71
     /**
73 72
      * @inheritdoc
74 73
      */
75
-    public function log($level, $message, array $context = [])
76
-    {
74
+    public function log($level, $message, array $context = []) {
77 75
         $record = [
78 76
             'level' => $level,
79 77
             'message' => $message,
@@ -84,13 +82,11 @@  discard block
 block discarded – undo
84 82
         $this->records[] = $record;
85 83
     }
86 84
 
87
-    public function hasRecords($level)
88
-    {
85
+    public function hasRecords($level) {
89 86
         return isset($this->recordsByLevel[$level]);
90 87
     }
91 88
 
92
-    public function hasRecord($record, $level)
93
-    {
89
+    public function hasRecord($record, $level) {
94 90
         if (is_string($record)) {
95 91
             $record = ['message' => $record];
96 92
         }
@@ -105,22 +101,19 @@  discard block
 block discarded – undo
105 101
         }, $level);
106 102
     }
107 103
 
108
-    public function hasRecordThatContains($message, $level)
109
-    {
104
+    public function hasRecordThatContains($message, $level) {
110 105
         return $this->hasRecordThatPasses(function ($rec) use ($message) {
111 106
             return strpos($rec['message'], $message) !== false;
112 107
         }, $level);
113 108
     }
114 109
 
115
-    public function hasRecordThatMatches($regex, $level)
116
-    {
110
+    public function hasRecordThatMatches($regex, $level) {
117 111
         return $this->hasRecordThatPasses(function ($rec) use ($regex) {
118 112
             return preg_match($regex, $rec['message']) > 0;
119 113
         }, $level);
120 114
     }
121 115
 
122
-    public function hasRecordThatPasses(callable $predicate, $level)
123
-    {
116
+    public function hasRecordThatPasses(callable $predicate, $level) {
124 117
         if (!isset($this->recordsByLevel[$level])) {
125 118
             return false;
126 119
         }
@@ -132,8 +125,7 @@  discard block
 block discarded – undo
132 125
         return false;
133 126
     }
134 127
 
135
-    public function __call($method, $args)
136
-    {
128
+    public function __call($method, $args) {
137 129
         if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
138 130
             $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
139 131
             $level = strtolower($matches[2]);
@@ -145,8 +137,7 @@  discard block
 block discarded – undo
145 137
         throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
146 138
     }
147 139
 
148
-    public function reset()
149
-    {
140
+    public function reset() {
150 141
         $this->records = [];
151 142
         $this->recordsByLevel = [];
152 143
     }
Please login to merge, or discard this patch.
vendor/psr/log/Psr/Log/Test/DummyTest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,10 +15,8 @@
 block discarded – undo
15 15
  *
16 16
  * @internal
17 17
  */
18
-class DummyTest
19
-{
20
-    public function __toString()
21
-    {
18
+class DummyTest {
19
+    public function __toString() {
22 20
         return 'DummyTest';
23 21
     }
24 22
 }
Please login to merge, or discard this patch.
vendor/psr/log/Psr/Log/LogLevel.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
 /**
12 12
  * Describes log levels.
13 13
  */
14
-class LogLevel
15
-{
14
+class LogLevel {
16 15
     const EMERGENCY = 'emergency';
17 16
     const ALERT     = 'alert';
18 17
     const CRITICAL  = 'critical';
Please login to merge, or discard this patch.
vendor/gettext/languages/src/Language.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
  * Main class to convert the plural rules of a language from CLDR to gettext.
9 9
  */
10
-class Language
11
-{
10
+class Language {
12 11
     /**
13 12
      * The language ID.
14 13
      *
@@ -72,8 +71,7 @@  discard block
 block discarded – undo
72 71
      *
73 72
      * @throws \Exception throws an Exception if $fullId is not valid
74 73
      */
75
-    private function __construct($info)
76
-    {
74
+    private function __construct($info) {
77 75
         $this->id = $info['id'];
78 76
         $this->name = $info['name'];
79 77
         $this->supersededBy = isset($info['supersededBy']) ? $info['supersededBy'] : null;
@@ -115,8 +113,7 @@  discard block
 block discarded – undo
115 113
      *
116 114
      * @return \Gettext\Languages\Language[]
117 115
      */
118
-    public static function getAll()
119
-    {
116
+    public static function getAll() {
120 117
         $result = array();
121 118
         foreach (array_keys(CldrData::getLanguageNames()) as $cldrLanguageId) {
122 119
             $result[] = new self(CldrData::getLanguageInfo($cldrLanguageId));
@@ -132,8 +129,7 @@  discard block
 block discarded – undo
132 129
      *
133 130
      * @return \Gettext\Languages\Language|null
134 131
      */
135
-    public static function getById($id)
136
-    {
132
+    public static function getById($id) {
137 133
         $result = null;
138 134
         $info = CldrData::getLanguageInfo($id);
139 135
         if (isset($info)) {
@@ -148,8 +144,7 @@  discard block
 block discarded – undo
148 144
      *
149 145
      * @return \Gettext\Languages\Language
150 146
      */
151
-    public function getUSAsciiClone()
152
-    {
147
+    public function getUSAsciiClone() {
153 148
         $clone = clone $this;
154 149
         self::asciifier($clone->name);
155 150
         self::asciifier($clone->formula);
@@ -170,8 +165,7 @@  discard block
 block discarded – undo
170 165
      *
171 166
      * @return string
172 167
      */
173
-    public function buildFormula($withoutParenthesis = false)
174
-    {
168
+    public function buildFormula($withoutParenthesis = false) {
175 169
         $numCategories = count($this->categories);
176 170
         switch ($numCategories) {
177 171
             case 1:
@@ -203,8 +197,7 @@  discard block
 block discarded – undo
203 197
      *
204 198
      * @throws \Exception
205 199
      */
206
-    private function checkAlwaysTrueCategories()
207
-    {
200
+    private function checkAlwaysTrueCategories() {
208 201
         $alwaysTrueCategory = null;
209 202
         foreach ($this->categories as $category) {
210 203
             if ($category->formula === true) {
@@ -234,8 +227,7 @@  discard block
 block discarded – undo
234 227
      *
235 228
      * @throws \Exception
236 229
      */
237
-    private function checkAlwaysFalseCategories()
238
-    {
230
+    private function checkAlwaysFalseCategories() {
239 231
         $filtered = array();
240 232
         foreach ($this->categories as $category) {
241 233
             if ($category->formula === false) {
@@ -256,8 +248,7 @@  discard block
 block discarded – undo
256 248
      *
257 249
      * @throws \Exception
258 250
      */
259
-    private function checkAllCategoriesWithExamples()
260
-    {
251
+    private function checkAllCategoriesWithExamples() {
261 252
         $allCategoriesIds = array();
262 253
         $goodCategories = array();
263 254
         $badCategories = array();
@@ -337,8 +328,7 @@  discard block
 block discarded – undo
337 328
      *
338 329
      * @return string
339 330
      */
340
-    private static function reverseFormula($formula)
341
-    {
331
+    private static function reverseFormula($formula) {
342 332
         if (preg_match('/^n( % \d+)? == \d+(\.\.\d+|,\d+)*?$/', $formula)) {
343 333
             return str_replace(' == ', ' != ', $formula);
344 334
         }
@@ -368,8 +358,7 @@  discard block
 block discarded – undo
368 358
      *
369 359
      * @return string
370 360
      */
371
-    private static function reduceFormula($formula)
372
-    {
361
+    private static function reduceFormula($formula) {
373 362
         $map = array(
374 363
             'n != 0 && n != 1' => 'n > 1',
375 364
             '(n == 0 || n == 1) && n != 0' => 'n == 1',
@@ -385,8 +374,7 @@  discard block
 block discarded – undo
385 374
      *
386 375
      * @throws \Exception
387 376
      */
388
-    private static function asciifier(&$value)
389
-    {
377
+    private static function asciifier(&$value) {
390 378
         if (is_string($value) && $value !== '') {
391 379
             // Avoid converting from 'Ÿ' to '"Y', let's prefer 'Y'
392 380
             $value = strtr($value, array(
Please login to merge, or discard this patch.
vendor/gettext/languages/src/CldrData.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
  * Holds the CLDR data.
9 9
  */
10
-class CldrData
11
-{
10
+class CldrData {
12 11
     /**
13 12
      * Super-special plural category: this should always be present for any language.
14 13
      *
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      *
43 42
      * @return string[]
44 43
      */
45
-    public static function getLanguageNames()
46
-    {
44
+    public static function getLanguageNames() {
47 45
         return self::getData('languages');
48 46
     }
49 47
 
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
      *
55 53
      * @return string[]
56 54
      */
57
-    public static function getTerritoryNames()
58
-    {
55
+    public static function getTerritoryNames() {
59 56
         return self::getData('territories');
60 57
     }
61 58
 
@@ -68,8 +65,7 @@  discard block
 block discarded – undo
68 65
      *
69 66
      * @return string[]
70 67
      */
71
-    public static function getScriptNames($standAlone)
72
-    {
68
+    public static function getScriptNames($standAlone) {
73 69
         return self::getData($standAlone ? 'standAloneScripts' : 'scripts');
74 70
     }
75 71
 
@@ -88,8 +84,7 @@  discard block
 block discarded – undo
88 84
      *
89 85
      * @return array
90 86
      */
91
-    public static function getPlurals()
92
-    {
87
+    public static function getPlurals() {
93 88
         return self::getData('plurals');
94 89
     }
95 90
 
@@ -98,8 +93,7 @@  discard block
 block discarded – undo
98 93
      *
99 94
      * @return array keys are the former language codes, values are the new language/locale codes
100 95
      */
101
-    public static function getSupersededLanguages()
102
-    {
96
+    public static function getSupersededLanguages() {
103 97
         return self::getData('supersededLanguages');
104 98
     }
105 99
 
@@ -110,8 +104,7 @@  discard block
 block discarded – undo
110 104
      *
111 105
      * @return array|null Returns an array with the keys 'id' (normalized), 'name', 'supersededBy' (optional), 'territory' (optional), 'script' (optional), 'baseLanguage' (optional), 'categories'. If $id is not valid returns null.
112 106
      */
113
-    public static function getLanguageInfo($id)
114
-    {
107
+    public static function getLanguageInfo($id) {
115 108
         $result = null;
116 109
         $matches = array();
117 110
         if (preg_match('/^([a-z]{2,3})(?:[_\-]([a-z]{4}))?(?:[_\-]([a-z]{2}|[0-9]{3}))?(?:$|-)/i', $id, $matches)) {
@@ -235,8 +228,7 @@  discard block
 block discarded – undo
235 228
      *
236 229
      * @return array
237 230
      */
238
-    private static function getData($key)
239
-    {
231
+    private static function getData($key) {
240 232
         if (!isset(self::$data)) {
241 233
             $fixKeys = function ($list, &$standAlone = null) {
242 234
                 $result = array();
Please login to merge, or discard this patch.
vendor/gettext/languages/src/Exporter/Exporter.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
  * Base class for all the exporters.
9 9
  */
10
-abstract class Exporter
11
-{
10
+abstract class Exporter {
12 11
     /**
13 12
      * @var array
14 13
      */
@@ -21,8 +20,7 @@  discard block
 block discarded – undo
21 20
      *
22 21
      * @return string[]
23 22
      */
24
-    final public static function getExporters($onlyForPublicUse = false)
25
-    {
23
+    final public static function getExporters($onlyForPublicUse = false) {
26 24
         if (!isset(self::$exporters)) {
27 25
             $exporters = array();
28 26
             $m = null;
@@ -58,8 +56,7 @@  discard block
 block discarded – undo
58 56
      *
59 57
      * @return string
60 58
      */
61
-    final public static function getExporterDescription($exporterHandle)
62
-    {
59
+    final public static function getExporterDescription($exporterHandle) {
63 60
         $exporters = self::getExporters();
64 61
         if (!isset($exporters[$exporterHandle])) {
65 62
             throw new Exception("Invalid exporter handle: '{$exporterHandle}'");
@@ -75,8 +72,7 @@  discard block
 block discarded – undo
75 72
      *
76 73
      * @return string
77 74
      */
78
-    final public static function getExporterClassName($exporterHandle)
79
-    {
75
+    final public static function getExporterClassName($exporterHandle) {
80 76
         return __NAMESPACE__ . '\\' . ucfirst(strtolower($exporterHandle));
81 77
     }
82 78
 
@@ -88,8 +84,7 @@  discard block
 block discarded – undo
88 84
      *
89 85
      * @return string
90 86
      */
91
-    final public static function toString($languages, $options = null)
92
-    {
87
+    final public static function toString($languages, $options = null) {
93 88
         if (isset($options) && is_array($options)) {
94 89
             if (isset($options['us-ascii']) && $options['us-ascii']) {
95 90
                 $asciiList = array();
@@ -111,8 +106,7 @@  discard block
 block discarded – undo
111 106
      *
112 107
      * @throws \Exception
113 108
      */
114
-    final public static function toFile($languages, $filename, $options = null)
115
-    {
109
+    final public static function toFile($languages, $filename, $options = null) {
116 110
         $data = self::toString($languages, $options);
117 111
         if (@file_put_contents($filename, $data) === false) {
118 112
             throw new Exception("Error writing data to '{$filename}'");
@@ -124,8 +118,7 @@  discard block
 block discarded – undo
124 118
      *
125 119
      * @return bool
126 120
      */
127
-    public static function isForPublicUse()
128
-    {
121
+    public static function isForPublicUse() {
129 122
         return true;
130 123
     }
131 124
 
@@ -134,8 +127,7 @@  discard block
 block discarded – undo
134 127
      *
135 128
      * @return string
136 129
      */
137
-    public static function getDescription()
138
-    {
130
+    public static function getDescription() {
139 131
         throw new Exception(get_called_class() . ' does not implement the method ' . __FUNCTION__);
140 132
     }
141 133
 
@@ -146,8 +138,7 @@  discard block
 block discarded – undo
146 138
      *
147 139
      * @return string
148 140
      */
149
-    protected static function toStringDo($languages)
150
-    {
141
+    protected static function toStringDo($languages) {
151 142
         throw new Exception(get_called_class() . ' does not implement the method ' . __FUNCTION__);
152 143
     }
153 144
 }
Please login to merge, or discard this patch.
vendor/gettext/languages/src/Exporter/Html.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,15 +2,13 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Gettext\Languages\Exporter;
4 4
 
5
-class Html extends Exporter
6
-{
5
+class Html extends Exporter {
7 6
     /**
8 7
      * {@inheritdoc}
9 8
      *
10 9
      * @see \Gettext\Languages\Exporter\Exporter::getDescription()
11 10
      */
12
-    public static function getDescription()
13
-    {
11
+    public static function getDescription() {
14 12
         return 'Build a HTML table';
15 13
     }
16 14
 
@@ -19,18 +17,15 @@  discard block
 block discarded – undo
19 17
      *
20 18
      * @see \Gettext\Languages\Exporter\Exporter::toStringDo()
21 19
      */
22
-    protected static function toStringDo($languages)
23
-    {
20
+    protected static function toStringDo($languages) {
24 21
         return self::buildTable($languages, false);
25 22
     }
26 23
 
27
-    protected static function h($str)
28
-    {
24
+    protected static function h($str) {
29 25
         return htmlspecialchars($str, ENT_COMPAT, 'UTF-8');
30 26
     }
31 27
 
32
-    protected static function buildTable($languages, $forDocs)
33
-    {
28
+    protected static function buildTable($languages, $forDocs) {
34 29
         $prefix = $forDocs ? '            ' : '';
35 30
         $lines = array();
36 31
         $lines[] = $prefix . '<table' . ($forDocs ? ' class="table table-bordered table-condensed table-striped"' : '') . '>';
Please login to merge, or discard this patch.
vendor/gettext/languages/src/Exporter/Xml.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,15 +2,13 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Gettext\Languages\Exporter;
4 4
 
5
-class Xml extends Exporter
6
-{
5
+class Xml extends Exporter {
7 6
     /**
8 7
      * {@inheritdoc}
9 8
      *
10 9
      * @see \Gettext\Languages\Exporter\Exporter::getDescription()
11 10
      */
12
-    public static function getDescription()
13
-    {
11
+    public static function getDescription() {
14 12
         return 'Build an XML file - schema available at http://mlocati.github.io/cldr-to-gettext-plural-rules/GettextLanguages.xsd';
15 13
     }
16 14
 
@@ -19,8 +17,7 @@  discard block
 block discarded – undo
19 17
      *
20 18
      * @see \Gettext\Languages\Exporter\Exporter::toStringDo()
21 19
      */
22
-    protected static function toStringDo($languages)
23
-    {
20
+    protected static function toStringDo($languages) {
24 21
         $xml = new \DOMDocument('1.0', 'UTF-8');
25 22
         $xml->loadXML('<languages
26 23
             xmlns="https://github.com/mlocati/cldr-to-gettext-plural-rules"
Please login to merge, or discard this patch.