Code Duplication    Length = 5-7 lines in 2 locations

class/sql_generator.php 1 location

@@ 727-731 (lines=5) @@
724
			{
725
				// SELECT/UPDATE/INSERT/DELETE ? Use the 1st occur guy.
726
				$part = strtoupper($part);
727
				if (empty($action) &&
728
					in_array($part,
729
						array('SELECT', 'UPDATE', 'INSERT', 'DELETE'))
730
					)
731
					$action = $part;
732
			}
733
734
		// Call seperate func to generate sql

src/Fwlib/Db/SqlGenerator.php 1 location

@@ 400-406 (lines=7) @@
397
        if (empty($part)) {
398
            foreach ($this->paramPart as $key => $val) {
399
                // SELECT/UPDATE/INSERT/DELETE ? Use the 1st occurred one
400
                if (in_array(
401
                    $key,
402
                    ['SELECT', 'UPDATE', 'INSERT', 'DELETE']
403
                )) {
404
                    $part = $key;
405
                    break;
406
                }
407
            }
408
        }
409