Code Duplication    Length = 14-17 lines in 2 locations

examples/Speller/checkText.php 1 location

@@ 107-120 (lines=14) @@
104
        <?php
105
            $result = [];
106
107
            if (isset($_POST['submit'])) {
108
                $spellerClient = new SpellerClient();
109
110
                $result = $spellerClient->checkText(
111
                    $_POST['text'],
112
                    [
113
                        'lang' => $_POST['lang'],
114
                        'options' => $_POST['options'],
115
                        'format' => $_POST['format'],
116
                        'callback' => $_POST['callback'],
117
                        'ie' => $_POST['ie'],
118
                    ]
119
                );
120
            }
121
            $resultString = json_encode($result, JSON_PRETTY_PRINT);
122
        ?>
123
        <pre><?=$resultString?></pre>

examples/Speller/checkTexts.php 1 location

@@ 118-134 (lines=17) @@
115
        <?php
116
        $result = [];
117
118
        if (isset($_POST['submit'])) {
119
            $spellerClient = new SpellerClient();
120
121
            $result = $spellerClient->checkTexts(
122
                [
123
                    $_POST['text0'],
124
                    $_POST['text1'],
125
                ],
126
                [
127
                    'lang' => $_POST['lang'],
128
                    'options' => $_POST['options'],
129
                    'format' => $_POST['format'],
130
                    'callback' => $_POST['callback'],
131
                    'ie' => $_POST['ie'],
132
                ]
133
            );
134
        }
135
        $resultString = json_encode($result, JSON_PRETTY_PRINT);
136
        ?>
137
        <pre><?=$resultString?></pre>