Code Duplication    Length = 7-11 lines in 4 locations

src/Extender.php 1 location

@@ 324-330 (lines=7) @@
321
     *
322
     * @return  Extender          $this
323
     */
324
    final public function setMaxChildsRuntime($time) {
325
326
        $this->max_childs_runtime = filter_var($time, FILTER_VALIDATE_INT, array("min_range" => 1, "default" => 300));
327
328
        return $this;
329
330
    }
331
332
    /**
333
     * Get maximum time (in seconds) the parent will wait for child tasks to be completed (in miltithread mode)

src/Comodojo/Extender/Base/Daemon.php 1 location

@@ 192-201 (lines=10) @@
189
190
    }
191
192
    public static function getLoopTime($looptime) {
193
194
        return filter_var($looptime, FILTER_VALIDATE_INT, array(
195
            'options' => array(
196
                'default' => 1,
197
                'min_range' => 1
198
            )
199
        ));
200
201
    }
202
203
}
204

src/Comodojo/Extender/Components/Ipc.php 1 location

@@ 100-109 (lines=10) @@
97
98
    }
99
100
    private static function getBytes($bytes = null) {
101
102
        return filter_var($bytes, FILTER_VALIDATE_INT, array(
103
            'options' => array(
104
                'default' => 2048,
105
                'min_range' => 1024
106
            )
107
        ));
108
109
    }
110
111
}
112

src/Comodojo/Extender/Utils/ProcessTools.php 1 location

@@ 93-103 (lines=11) @@
90
91
    }
92
93
    public static function filterNiceness($niceness=null) {
94
95
        return filter_var($niceness, FILTER_VALIDATE_INT, array(
96
            'options' => array(
97
                'default' => 0,
98
                'min_range' => -10,
99
                'max_range' => 10
100
            )
101
        ));
102
103
    }
104
105
    public static function getPid() {
106