This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PostData = { | |
userId: number, | |
message: string, | |
} | |
interface Postable { | |
/** | |
* Publishes post | |
* | |
* @param {PostData} data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Postable | |
{ | |
/** | |
* Publishes post | |
* | |
* @param array<string, mixed> data | |
* @return mixed | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type NotifyingData = { | |
some: string, | |
more: string, | |
} | |
interface Notifiable { | |
/** | |
* Sends notifications | |
* | |
* @param {NotifyingData} data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Notifiable | |
{ | |
/** | |
* Send notifications | |
* | |
* @param array $data | |
* @return void | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class Product | |
{ | |
private string $filePath; | |
public function __construct(string $filePath) | |
{ | |
$this->filePath = $filePath; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express, { Router, Request, Response } from 'express' | |
import fs from 'fs'; | |
import path from 'path'; | |
abstract class Product { | |
private filePath: string; | |
private response: Response; | |
constructor(filePath: string, response: Response) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class AbstractProduct { | |
private title: string; | |
constructor(title: string) { | |
this.title = title; | |
} | |
public getTitle(): string { | |
return this.title; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class AbstractProduct | |
{ | |
private string $title; | |
public function getTitle(): string | |
{ | |
return $this->title; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Job { | |
private String details; | |
public Job(String details) { | |
this.details = details; | |
} | |
public String requirements() { | |
return this.details; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Job { | |
private $details; | |
public function __construct($details) { | |
$this->details = $details; | |
} | |
public function requirements() { |
NewerOlder