Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Failed
Push — improve-identifiable-attribute ( 8fd47e )
by Pedro
22:37 queued 07:45
created
src/app/Library/Database/DatabaseSchema.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $connection = $connection ?: config('database.default');
28 28
 
29
-        self::$schema[$connection] = LazyCollection::make(self::getCreateSchema($connection)->getTables())->mapWithKeys(function ($table, $key) use ($connection) {
29
+        self::$schema[$connection] = LazyCollection::make(self::getCreateSchema($connection)->getTables())->mapWithKeys(function($table, $key) use ($connection) {
30 30
             $tableName = is_array($table) ? $table['name'] : $table->getName();
31 31
 
32 32
             if ($existingTable = self::$schema[$connection][$tableName] ?? false) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     private static function generateDatabaseSchema(string $connection, string $table)
67 67
     {
68
-        if (! isset(self::$schema[$connection][$table])) {
68
+        if (!isset(self::$schema[$connection][$table])) {
69 69
             self::$schema[$connection][$table] = self::mapTable($connection, $table);
70 70
         }
71 71
     }
@@ -74,24 +74,23 @@  discard block
 block discarded – undo
74 74
     {
75 75
         try {
76 76
             $table = method_exists(self::getCreateSchema($connection), 'getTable') ?
77
-                        self::getCreateSchema($connection)->getTable($tableName) :
78
-                        self::getCreateSchema($connection)->getColumns($tableName);
77
+                        self::getCreateSchema($connection)->getTable($tableName) : self::getCreateSchema($connection)->getColumns($tableName);
79 78
         } catch (\Exception $e) {
80 79
             return new Table($tableName, []);
81 80
         }
82 81
 
83
-        if (! is_array($table)) {
82
+        if (!is_array($table)) {
84 83
             return $table;
85 84
         }
86 85
 
87
-        if(empty($table)) {
86
+        if (empty($table)) {
88 87
             return new Table($tableName, []);
89 88
         }
90 89
 
91 90
         $schemaManager = self::getSchemaManager($connection);
92 91
         $indexes = $schemaManager->getIndexes($tableName);
93 92
 
94
-        $indexes = array_map(function ($index) {
93
+        $indexes = array_map(function($index) {
95 94
             return $index['columns'];
96 95
         }, $indexes);
97 96
 
@@ -109,7 +108,7 @@  discard block
 block discarded – undo
109 108
 
110 109
         $indexes = self::$schema[$connection][$table]->getIndexes();
111 110
 
112
-        $indexes = \Illuminate\Support\Arr::flatten(array_map(function ($index) {
111
+        $indexes = \Illuminate\Support\Arr::flatten(array_map(function($index) {
113 112
             return is_string($index) ? $index : $index->getColumns();
114 113
         }, $indexes));
115 114
 
Please login to merge, or discard this patch.
src/app/Models/Traits/HasIdentifiableAttribute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         // we get the first column from database
56 56
         // that is NOT indexed (usually primary, foreign keys)
57 57
         foreach ($columnNames as $columnName) {
58
-            if (! in_array($columnName, $indexes)) {
58
+            if (!in_array($columnName, $indexes)) {
59 59
                 //check for convention "field<_id>" in case developer didn't add foreign key constraints.
60 60
                 if (strpos($columnName, '_id') !== false) {
61 61
                     continue;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         // in case everything fails we just return the first column in database
69 69
         $firstColumnInTable = Arr::first($columnNames);
70
-        if(! empty($firstColumnInTable)) {
70
+        if (!empty($firstColumnInTable)) {
71 71
             return $firstColumnInTable;
72 72
         }
73 73
 
Please login to merge, or discard this patch.