Completed
Push — master ( cd378b...329175 )
by Ori
01:30
created
update-schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 {
5 5
     $schemaUrl = 'http://specs.frictionlessdata.io/schemas/table-schema.json';
6 6
     $base_filename = realpath(dirname(__FILE__))
7
-        .DIRECTORY_SEPARATOR.'src'
8
-        .DIRECTORY_SEPARATOR.'schemas'
7
+        .DIRECTORY_SEPARATOR . 'src'
8
+        .DIRECTORY_SEPARATOR . 'schemas'
9 9
         .DIRECTORY_SEPARATOR;
10
-    $filename = $base_filename.'table-schema.json';
10
+    $filename = $base_filename . 'table-schema.json';
11 11
     $old_schema = file_exists($filename) ? file_get_contents($filename) : 'FORCE UPDATE';
12 12
     echo "downloading schema from {$schemaUrl}\n";
13 13
     $new_schema = file_get_contents($schemaUrl);
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     } else {
17 17
         echo "schema changed - updating local file\n";
18 18
         file_put_contents($filename, $new_schema);
19
-        file_put_contents($base_filename.'CHANGELOG', "\n\n".date('c')."\n* check the git diff and summarize the spec changes here\n* \n\n", FILE_APPEND);
19
+        file_put_contents($base_filename . 'CHANGELOG', "\n\n" . date('c') . "\n* check the git diff and summarize the spec changes here\n* \n\n", FILE_APPEND);
20 20
     }
21 21
 
22 22
     return 0;
Please login to merge, or discard this patch.
src/EditableSchema.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
             $this->fieldsCache = [];
20 20
             foreach ($newFields as $name => $field) {
21 21
                 if (!is_a($field, "frictionlessdata\\tableschema\\Fields\\BaseField")) {
22
-                    if (!isset($field->name)) $field->name = $name;
22
+                    if (!isset($field->name)) {
23
+                        $field->name = $name;
24
+                    }
23 25
                     $field = FieldsFactory::field($field);
24 26
                 }
25 27
                 $this->fieldsCache[$name] = $field;
Please login to merge, or discard this patch.
src/SchemaValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $descriptor = json_decode(json_encode($this->descriptor));
60 60
         $validator->validate(
61 61
             $descriptor,
62
-            (object) ['$ref' => 'file://'.realpath(dirname(__FILE__)).'/schemas/table-schema.json']
62
+            (object)['$ref' => 'file://' . realpath(dirname(__FILE__)) . '/schemas/table-schema.json']
63 63
         );
64 64
         if (!$validator->isValid()) {
65 65
             foreach ($validator->getErrors() as $error) {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     protected function validateKeys()
75 75
     {
76
-        $fieldNames = array_map(function ($field) {
76
+        $fieldNames = array_map(function($field) {
77 77
             return $field->name;
78 78
         }, $this->descriptor->fields);
79 79
         if (isset($this->descriptor->primaryKey)) {
Please login to merge, or discard this patch.