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
76
        if (is_null($scriptView)) {
77
            $scriptView = $this->versionEngine->getVersion()->scriptView();
78
        }
79
80
        return new DatatableView($tableView, $scriptView, $this->viewFactory, $this->configRepository, []);
81
    }
82
}

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
118
        if (is_null($scriptView)) {
119
            $scriptView = $this->versionEngine->getVersion()->scriptView();
120
        }
121
122
        return new DatatableView($tableView, $scriptView, $this->viewFactory, $this->configRepository,
123
            $this->columnConfigurations);
124
    }
125
}
126