Call to undefined function is()

i18n

#1

Hi, more recently I started to deal with CakePHP, I’m writing a function to add a material with a modal form (PopUP - a flashing window) to the database, I registered a function that should keep all the contained forms in the database, but when I refresh the page I get an error Call to undefined function is (), tell me, please, where I made a mistake when writing functions. Listing of the function I am attaching:
public function index() {
// debug($this->request->data);
if ($this->request-is(‘post’)){
$this->Tets->create();
if($this->Test->save($this->request->data)){
$this->Session->setFlash(‘Good’);
$this->redirect([‘action’ => ‘index’]);
} else{
$this->Session->setFlash(‘Error’);
}
}

    }

#2

if ($this->request-is(‘post’)){

you have minus (-) instead of object operator (->)