@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | public function setModels($models, $csv) |
35 | 35 | { |
36 | 36 | foreach ($models as $table => $model) { |
37 | - if (is_array($model) == false ) { |
|
37 | + if (is_array($model) == false) { |
|
38 | 38 | continue; |
39 | 39 | } |
40 | 40 | $total = count($model); |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | { |
54 | 54 | foreach ($config as $key => $rec) { |
55 | 55 | $col = $this->getCsvCol($rec); |
56 | - $func = ( isset($rec['func']) === true && $rec['func'] ) ? $rec['func'] : null; |
|
56 | + $func = (isset($rec['func']) === true && $rec['func']) ? $rec['func'] : null; |
|
57 | 57 | if (method_exists($this, $func) === true) { |
58 | 58 | $this->$func($model, $key, $csv, $col); |
59 | - } elseif ( $func && method_exists($this, $func) === false) { |
|
59 | + } elseif ($func && method_exists($this, $func) === false) { |
|
60 | 60 | throw new \Exception(get_class($this) . 'に関数=' . $func . 'が実装されていません。(table=' . $table . ')'); |
61 | 61 | } elseif (isset($rec['csv']) === true && isset($csv[$col]) === true) { |
62 | 62 | $model->$key = $csv[$col]; |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $col = isset($rec['csv']) ? $rec['csv'] : null; |
73 | 73 | if (strpos($col, ",") !== false) { |
74 | 74 | $col = explode(",", $col); |
75 | - } elseif ( is_numeric($col) === true ) { |
|
76 | - $col = ($col + 0 ) -1; |
|
75 | + } elseif (is_numeric($col) === true) { |
|
76 | + $col = ($col+0)-1; |
|
77 | 77 | } |
78 | 78 | return $col; |
79 | 79 | } |