argument(0)->value('h'); if (in_array(strtolower($mode), [2, 'v', 'vert', 'vertical'])) { // flip vertical return $image->getCore()->flipImage(); } else { // flip horizontal return $image->getCore()->flopImage(); } } }