Code Duplication    Length = 11-12 lines in 2 locations

src/OpenSkill/Datatable/Datatable.php 1 location

@@ 70-80 (lines=11) @@
67
     *
68
     * @return DatatableView the view to work with
69
     */
70
    public function view($tableView = null, $scriptView = null)
71
    {
72
        if (is_null($tableView)) {
73
            $tableView = $this->versionEngine->getVersion()->tableView();
74
        }
75
        if (is_null($scriptView)) {
76
            $scriptView = $this->versionEngine->getVersion()->scriptView();
77
        }
78
79
        return new DatatableView($tableView, $scriptView, $this->viewFactory, $this->configRepository, []);
80
    }
81
}

src/OpenSkill/Datatable/DatatableService.php 1 location

@@ 112-123 (lines=12) @@
109
     * @param string $scriptView the view to use or null if the standard view should be used for the table and the script
110
     * @return DatatableView
111
     */
112
    public function view($tableView = null, $scriptView = null)
113
    {
114
        if (is_null($tableView)) {
115
            $tableView = $this->versionEngine->getVersion()->tableView();
116
        }
117
        if (is_null($scriptView)) {
118
            $scriptView = $this->versionEngine->getVersion()->scriptView();
119
        }
120
121
        return new DatatableView($tableView, $scriptView, $this->viewFactory, $this->configRepository,
122
            $this->columnConfigurations);
123
    }
124
}