Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c63b3a

Browse files
committed
Replace tabs to 4 spaces
1 parent2d3bd93 commit9c63b3a

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

‎README.md‎

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,40 +1182,40 @@ all of the settings. Making them optional helps prevent having a "fat interface"
11821182
**Bad:**
11831183
```php
11841184
interface WorkerInterface {
1185-
public function work();
1186-
public function eat();
1185+
public function work();
1186+
public function eat();
11871187
}
11881188

11891189
class Worker implements WorkerInterface {
1190-
public function work() {
1191-
// ....working
1192-
}
1193-
public function eat() {
1194-
// ...... eating in launch break
1195-
}
1190+
public function work() {
1191+
// ....working
1192+
}
1193+
public function eat() {
1194+
// ...... eating in launch break
1195+
}
11961196
}
11971197

11981198
class SuperWorker implements WorkerInterface {
1199-
public function work() {
1200-
//.... working much more
1201-
}
1199+
public function work() {
1200+
//.... working much more
1201+
}
12021202

1203-
public function eat() {
1204-
//.... eating in launch break
1205-
}
1203+
public function eat() {
1204+
//.... eating in launch break
1205+
}
12061206
}
12071207

12081208
class Manager {
12091209
/** @var WorkerInterface $worker **/
12101210
private $worker;
12111211

12121212
public void setWorker(WorkerInterface $worker) {
1213-
$this->worker = $worker;
1214-
}
1213+
$this->worker = $worker;
1214+
}
12151215

1216-
public function manage() {
1217-
$this->worker->work();
1218-
}
1216+
public function manage() {
1217+
$this->worker->work();
1218+
}
12191219
}
12201220
```
12211221

@@ -1225,50 +1225,50 @@ interface WorkerInterface extends FeedableInterface, WorkableInterface {
12251225
}
12261226

12271227
interface WorkableInterface {
1228-
public function work();
1228+
public function work();
12291229
}
12301230

12311231
interface FeedableInterface {
1232-
public function eat();
1232+
public function eat();
12331233
}
12341234

12351235
class Worker implements WorkableInterface, FeedableInterface {
1236-
public function work() {
1237-
// ....working
1238-
}
1236+
public function work() {
1237+
// ....working
1238+
}
12391239

1240-
public function eat() {
1241-
//.... eating in launch break
1242-
}
1240+
public function eat() {
1241+
//.... eating in launch break
1242+
}
12431243
}
12441244

12451245
class Robot implements WorkableInterface {
1246-
public void work() {
1247-
// ....working
1248-
}
1246+
public void work() {
1247+
// ....working
1248+
}
12491249
}
12501250

12511251
class SuperWorker implements WorkerInterface {
1252-
public function work() {
1253-
//.... working much more
1254-
}
1252+
public function work() {
1253+
//.... working much more
1254+
}
12551255

1256-
public function eat() {
1257-
//.... eating in launch break
1258-
}
1256+
public function eat() {
1257+
//.... eating in launch break
1258+
}
12591259
}
12601260

12611261
class Manager {
12621262
/** @var $worker WorkableInterface **/
1263-
private $worker;
1263+
private $worker;
12641264

1265-
public function setWorker(WorkableInterface $w) {
1266-
$this->worker = $w;
1267-
}
1265+
public function setWorker(WorkableInterface $w) {
1266+
$this->worker = $w;
1267+
}
12681268

1269-
public function manage() {
1270-
$this->worker->work();
1271-
}
1269+
public function manage() {
1270+
$this->worker->work();
1271+
}
12721272
}
12731273
```
12741274
**[⬆ back to top](#table-of-contents)**
@@ -1309,9 +1309,9 @@ class Manager {
13091309
}
13101310

13111311
class SuperWorker extends Worker {
1312-
public function work() {
1313-
//.... working much more
1314-
}
1312+
public function work() {
1313+
//.... working much more
1314+
}
13151315
}
13161316
```
13171317

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp