diff --git a/src/Commands/PivotMigrationMakeCommand.php b/src/Commands/PivotMigrationMakeCommand.php index 2b2f37e..b9d498a 100644 --- a/src/Commands/PivotMigrationMakeCommand.php +++ b/src/Commands/PivotMigrationMakeCommand.php @@ -69,7 +69,8 @@ protected function getStub() */ protected function getPath($name = null) { - return './database/migrations/' . date('Y_m_d_His') . '_create_' . $this->getPivotTableName() . '_pivot_table.php'; + return './database/migrations/' . date('Y_m_d_His') . + '_create_' . $this->getPivotTableName() . '_pivot_table.php'; } /** @@ -83,8 +84,8 @@ protected function buildClass($name = null) $stub = $this->files->get($this->getStub()); return $this->replacePivotTableName($stub) - ->replaceSchema($stub) - ->replaceClass($stub, $name); + ->replaceSchema($stub) + ->replaceClass($stub, $name); } /** @@ -93,7 +94,7 @@ protected function buildClass($name = null) * @param string $stub * @return $this */ - public function replacePivotTableName(&$stub) + protected function replacePivotTableName(&$stub) { $stub = str_replace('{{pivotTableName}}', $this->getPivotTableName(), $stub); @@ -106,7 +107,7 @@ public function replacePivotTableName(&$stub) * @param string $stub * @return $this */ - public function replaceSchema(&$stub) + protected function replaceSchema(&$stub) { $tables = $this->getSortedTableNames(); @@ -124,7 +125,7 @@ public function replaceSchema(&$stub) * * @return string */ - public function getPivotTableName() + protected function getPivotTableName() { return implode('_', array_map('str_singular', $this->getSortedTableNames())); } @@ -134,7 +135,7 @@ public function getPivotTableName() * * @return array */ - private function getSortedTableNames() + protected function getSortedTableNames() { $tables = [ strtolower($this->argument('tableOne')),