-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220 from ivanlanin/nonstatic
Remove static classes #206; Reactivate PHPCPD and PHPMD
- Loading branch information
Showing
88 changed files
with
1,258 additions
and
1,338 deletions.
There are no files selected for viewing
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
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
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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
/** | ||
* PHPWord | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2014 PHPWord | ||
* @license http:https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Collection abstract class | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
abstract class AbstractCollection | ||
{ | ||
/** | ||
* Items | ||
* | ||
* @var array | ||
*/ | ||
private $items = array(); | ||
|
||
/** | ||
* Get items | ||
* | ||
* @return array | ||
*/ | ||
public function getItems() | ||
{ | ||
return $this->items; | ||
} | ||
|
||
/** | ||
* Get item by index | ||
* | ||
* @param int $index | ||
* @return mixed | ||
*/ | ||
public function getItem($index) | ||
{ | ||
if (array_key_exists($index, $this->items)) { | ||
return $this->items[$index]; | ||
} else { | ||
return null; | ||
} | ||
} | ||
|
||
/** | ||
* Set item | ||
* | ||
* @param int $index | ||
* @param mixed $item | ||
*/ | ||
public function setItem($index, $item) | ||
{ | ||
if (array_key_exists($index, $this->items)) { | ||
$this->items[$index] = $item; | ||
} | ||
} | ||
|
||
/** | ||
* Add new item | ||
* | ||
* @param mixed $item | ||
* @return int | ||
*/ | ||
public function addItem($item) | ||
{ | ||
$index = $this->countItems() + 1; | ||
$this->items[$index] = $item; | ||
|
||
return $index; | ||
} | ||
|
||
/** | ||
* Get item count | ||
* | ||
* @return int | ||
*/ | ||
public function countItems() | ||
{ | ||
return count($this->items); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* PHPWord | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2014 PHPWord | ||
* @license http:https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Endnotes collection | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
class Endnotes extends AbstractCollection | ||
{ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* PHPWord | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2014 PHPWord | ||
* @license http:https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Footnotes collection | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
class Footnotes extends AbstractCollection | ||
{ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* PHPWord | ||
* | ||
* @link https://github.com/PHPOffice/PHPWord | ||
* @copyright 2014 PHPWord | ||
* @license http:https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL | ||
*/ | ||
|
||
namespace PhpOffice\PhpWord\Collection; | ||
|
||
/** | ||
* Titles collection | ||
* | ||
* @since 0.10.0 | ||
*/ | ||
class Titles extends AbstractCollection | ||
{ | ||
} |
Oops, something went wrong.