@@ -3,8 +3,8 @@ |
||
| 3 | 3 | // application or vendor context |
| 4 | 4 | $autoload = [ |
| 5 | 5 | __DIR__ . '/../vendor/autoload.php', // application bin or phar |
| 6 | - __DIR__ . '/../autoload.php', // vendor bin |
|
| 7 | - __DIR__ . '/../../../autoload.php', // vendor |
|
| 6 | + __DIR__ . '/../autoload.php', // vendor bin |
|
| 7 | + __DIR__ . '/../../../autoload.php', // vendor |
|
| 8 | 8 | ]; |
| 9 | 9 | |
| 10 | 10 | foreach ($autoload as $file) { |
@@ -4,5 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface DataAwareInterface |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @return void |
|
| 9 | + */ |
|
| 7 | 10 | public function setDataManager(Manager $dataManager); |
| 8 | 11 | } |
@@ -4,9 +4,18 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface FormatterInterface |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @return string |
|
| 9 | + */ |
|
| 7 | 10 | public function asTitle($text, $level = 1); |
| 8 | 11 | |
| 12 | + /** |
|
| 13 | + * @return string |
|
| 14 | + */ |
|
| 9 | 15 | public function asBody($text); |
| 10 | 16 | |
| 17 | + /** |
|
| 18 | + * @return string |
|
| 19 | + */ |
|
| 11 | 20 | public function getDelimiter(); |
| 12 | 21 | } |
@@ -4,5 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface RendererAwareInterface |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @return void |
|
| 9 | + */ |
|
| 7 | 10 | public function setRenderer(RendererInterface $renderer); |
| 8 | 11 | } |
@@ -9,6 +9,7 @@ |
||
| 9 | 9 | * |
| 10 | 10 | * @param $name |
| 11 | 11 | * @param $arguments |
| 12 | + * @return string |
|
| 12 | 13 | */ |
| 13 | 14 | public function render($name, $arguments); |
| 14 | 15 | } |
@@ -6,13 +6,24 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface AdapterInterface |
| 8 | 8 | { |
| 9 | + /** |
|
| 10 | + * @return boolean |
|
| 11 | + */ |
|
| 9 | 12 | public function hasUpdate(); |
| 10 | 13 | |
| 11 | 14 | public function getOldVersion(); |
| 12 | 15 | |
| 13 | 16 | public function getNewVersion(); |
| 14 | 17 | |
| 18 | + /** |
|
| 19 | + * @param string $stability |
|
| 20 | + * |
|
| 21 | + * @return boolean |
|
| 22 | + */ |
|
| 15 | 23 | public function update($stability = Updater::STABILITY_ANY); |
| 16 | 24 | |
| 25 | + /** |
|
| 26 | + * @return boolean |
|
| 27 | + */ |
|
| 17 | 28 | public function rollback(); |
| 18 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @param string $key |
| 38 | - * @param null $default |
|
| 38 | + * @param File $default |
|
| 39 | 39 | * |
| 40 | 40 | * @return bool|mixed|null |
| 41 | 41 | */ |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | - * @return Generator |
|
| 215 | + * @return \RecursiveIteratorIterator |
|
| 216 | 216 | */ |
| 217 | 217 | private function getCacheFolderIterator() |
| 218 | 218 | { |
@@ -6,11 +6,23 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface ElementInterface |
| 8 | 8 | { |
| 9 | + /** |
|
| 10 | + * @return string |
|
| 11 | + */ |
|
| 9 | 12 | public function getTitle(); |
| 10 | 13 | |
| 14 | + /** |
|
| 15 | + * @return string |
|
| 16 | + */ |
|
| 11 | 17 | public function getBody(Context $context); |
| 12 | 18 | |
| 19 | + /** |
|
| 20 | + * @return integer |
|
| 21 | + */ |
|
| 13 | 22 | public function getOrder(); |
| 14 | 23 | |
| 24 | + /** |
|
| 25 | + * @return boolean |
|
| 26 | + */ |
|
| 15 | 27 | public function isRelevantTo(Context $context); |
| 16 | 28 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function getSuitableElements(Context $context) |
| 52 | 52 | { |
| 53 | - $elements = array_filter($this->specElements, function (ElementInterface $element) use ($context) { |
|
| 53 | + $elements = array_filter($this->specElements, function(ElementInterface $element) use ($context) { |
|
| 54 | 54 | return $element->isRelevantTo($context); |
| 55 | 55 | }); |
| 56 | 56 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | // sort elements (ASC) |
| 66 | - usort($elements, function (ElementInterface $a, ElementInterface $b) { |
|
| 66 | + usort($elements, function(ElementInterface $a, ElementInterface $b) { |
|
| 67 | 67 | return $a->getOrder() > $b->getOrder() ? 1 : ($a->getOrder() < $b->getOrder() ? -1 : 0); |
| 68 | 68 | }); |
| 69 | 69 | |