Changeset 2010122
- Timestamp:
- 01/10/2019 05:00:00 PM (7 years ago)
- Location:
- waj-copyright-year
- Files:
-
- 31 added
- 6 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/LICENSE (added)
-
tags/1.0.1/composer.json (added)
-
tags/1.0.1/composer.lock (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/src (added)
-
tags/1.0.1/src/CopyrightYear.php (added)
-
tags/1.0.1/vendor (added)
-
tags/1.0.1/vendor/autoload.php (added)
-
tags/1.0.1/vendor/composer (added)
-
tags/1.0.1/vendor/composer/ClassLoader.php (added)
-
tags/1.0.1/vendor/composer/LICENSE (added)
-
tags/1.0.1/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.1/vendor/composer/autoload_files.php (added)
-
tags/1.0.1/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.1/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.1/vendor/composer/autoload_real.php (added)
-
tags/1.0.1/vendor/composer/autoload_static.php (added)
-
tags/1.0.1/vendor/composer/installed.json (added)
-
tags/1.0.1/vendor/waughj (added)
-
tags/1.0.1/vendor/waughj/test-hash-item (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/.gitignore (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/LICENSE (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/README.md (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/composer.json (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/phpunit.xml (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/src (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/src/TestHashItem.php (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/tests (added)
-
tags/1.0.1/vendor/waughj/test-hash-item/tests/TestHashItemTest.php (added)
-
tags/1.0.1/waj-copyright-year.php (added)
-
trunk/composer.lock (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (modified) (2 diffs)
-
trunk/vendor/waughj/test-hash-item/README.md (modified) (1 diff)
-
trunk/vendor/waughj/test-hash-item/src/TestHashItem.php (modified) (2 diffs)
-
trunk/vendor/waughj/test-hash-item/tests/TestHashItemTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
waj-copyright-year/trunk/composer.lock
r1963099 r2010122 9 9 { 10 10 "name": "waughj/test-hash-item", 11 "version": "1. 0.1",11 "version": "1.1.0", 12 12 "source": { 13 13 "type": "git", 14 14 "url": "https://github.com/waughjai/test-hash-item.git", 15 "reference": " ddf5cbc1cadb2342d3a725a062bfaa20b7404807"16 }, 17 "dist": { 18 "type": "zip", 19 "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/ ddf5cbc1cadb2342d3a725a062bfaa20b7404807",20 "reference": " ddf5cbc1cadb2342d3a725a062bfaa20b7404807",15 "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394" 16 }, 17 "dist": { 18 "type": "zip", 19 "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/5657dc1ac52e629acdd6ce57936acafc60b00394", 20 "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394", 21 21 "shasum": "" 22 22 }, … … 48 48 "tests" 49 49 ], 50 "time": "2018-1 0-23T18:46:38+00:00"50 "time": "2018-11-29T20:46:20+00:00" 51 51 } 52 52 ], … … 1423 1423 }, 1424 1424 { 1425 "name": "symfony/polyfill-ctype", 1426 "version": "v1.10.0", 1427 "source": { 1428 "type": "git", 1429 "url": "https://github.com/symfony/polyfill-ctype.git", 1430 "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" 1431 }, 1432 "dist": { 1433 "type": "zip", 1434 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", 1435 "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", 1436 "shasum": "" 1437 }, 1438 "require": { 1439 "php": ">=5.3.3" 1440 }, 1441 "suggest": { 1442 "ext-ctype": "For best performance" 1443 }, 1444 "type": "library", 1445 "extra": { 1446 "branch-alias": { 1447 "dev-master": "1.9-dev" 1448 } 1449 }, 1450 "autoload": { 1451 "psr-4": { 1452 "Symfony\\Polyfill\\Ctype\\": "" 1453 }, 1454 "files": [ 1455 "bootstrap.php" 1456 ] 1457 }, 1458 "notification-url": "https://packagist.org/downloads/", 1459 "license": [ 1460 "MIT" 1461 ], 1462 "authors": [ 1463 { 1464 "name": "Symfony Community", 1465 "homepage": "https://symfony.com/contributors" 1466 }, 1467 { 1468 "name": "Gert de Pagter", 1469 "email": "BackEndTea@gmail.com" 1470 } 1471 ], 1472 "description": "Symfony polyfill for ctype functions", 1473 "homepage": "https://symfony.com", 1474 "keywords": [ 1475 "compatibility", 1476 "ctype", 1477 "polyfill", 1478 "portable" 1479 ], 1480 "time": "2018-08-06T14:22:27+00:00" 1481 }, 1482 { 1425 1483 "name": "theseer/tokenizer", 1426 1484 "version": "1.1.0", … … 1464 1522 { 1465 1523 "name": "webmozart/assert", 1466 "version": "1. 3.0",1524 "version": "1.4.0", 1467 1525 "source": { 1468 1526 "type": "git", 1469 1527 "url": "https://github.com/webmozart/assert.git", 1470 "reference": "0df1908962e7a3071564e857d86874dad1ef204a" 1471 }, 1472 "dist": { 1473 "type": "zip", 1474 "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", 1475 "reference": "0df1908962e7a3071564e857d86874dad1ef204a", 1476 "shasum": "" 1477 }, 1478 "require": { 1479 "php": "^5.3.3 || ^7.0" 1528 "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" 1529 }, 1530 "dist": { 1531 "type": "zip", 1532 "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", 1533 "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", 1534 "shasum": "" 1535 }, 1536 "require": { 1537 "php": "^5.3.3 || ^7.0", 1538 "symfony/polyfill-ctype": "^1.8" 1480 1539 }, 1481 1540 "require-dev": { … … 1510 1569 "validate" 1511 1570 ], 1512 "time": "2018- 01-29T19:49:41+00:00"1571 "time": "2018-12-25T11:19:39+00:00" 1513 1572 } 1514 1573 ], -
waj-copyright-year/trunk/readme.txt
r1963099 r2010122 3 3 Tags: copyright, year, footer, auto-update, new year 4 4 Requires at least: 4.9.8 5 Tested up to: 4.9.86 Stable tag: 1.0. 05 Tested up to: 5.0.3 6 Stable tag: 1.0.1 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 36 36 == Example == 37 37 38 ```` 39 <?php 38 <?php 40 39 41 declare( strict_types = 1 );42 namespace MyTheme\FooterTemplate43 {44 use \WaughJ\CopyrightYear\CopyrightYear;40 declare( strict_types = 1 ); 41 namespace MyTheme\FooterTemplate 42 { 43 use \WaughJ\CopyrightYear\CopyrightYear; 45 44 46 ?> 47 <footer class="footer"> 48 <p>Copyright Jaimeson Waugh © <?= new CopyrightYear( 2015, '-' ); ?>.</p> 49 </footer> 50 <?php 51 } 52 ```` 45 ?> 46 <footer class="footer"> 47 <p>Copyright Jaimeson Waugh © <?= new CopyrightYear( 2015, '-' ); ?>.</p> 48 </footer> 49 <?php 50 } 53 51 54 This will print the message, "Copyright Jaimeson Waugh © 2015-2018." 52 or 53 54 [copyright-year start="2015" divider="-"] 55 56 This will print the message, `Copyright Jaimeson Waugh © 2015-2018.` 55 57 56 58 57 59 == Changelog == 58 60 61 = 1.0.1 = 62 * Test in WordPress version 5.0. 63 * Rename main PHP file to be consistent with plugin name. 64 59 65 = 1.0 = 60 66 * Initial stable version. -
waj-copyright-year/trunk/vendor/composer/installed.json
r1963099 r2010122 2 2 { 3 3 "name": "waughj/test-hash-item", 4 "version": "1. 0.1",5 "version_normalized": "1. 0.1.0",4 "version": "1.1.0", 5 "version_normalized": "1.1.0.0", 6 6 "source": { 7 7 "type": "git", 8 8 "url": "https://github.com/waughjai/test-hash-item.git", 9 "reference": " ddf5cbc1cadb2342d3a725a062bfaa20b7404807"9 "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394" 10 10 }, 11 11 "dist": { 12 12 "type": "zip", 13 "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/ ddf5cbc1cadb2342d3a725a062bfaa20b7404807",14 "reference": " ddf5cbc1cadb2342d3a725a062bfaa20b7404807",13 "url": "https://api.github.com/repos/waughjai/test-hash-item/zipball/5657dc1ac52e629acdd6ce57936acafc60b00394", 14 "reference": "5657dc1ac52e629acdd6ce57936acafc60b00394", 15 15 "shasum": "" 16 16 }, … … 21 21 "phpunit/phpunit": "6.*" 22 22 }, 23 "time": "2018-1 0-23T18:46:38+00:00",23 "time": "2018-11-29T20:46:20+00:00", 24 24 "type": "project", 25 25 "installation-source": "dist", -
waj-copyright-year/trunk/vendor/waughj/test-hash-item/README.md
r1963099 r2010122 20 20 TestHashItemClass: Tests if the hash has something for the key & is an member of a certain class. Takes 4 arguments, with the last 3 being the usual list, key, & fallback arguments & the 1st argument being the name o' the class to test for. 21 21 22 TestHashItemIsTrue: Tests if hash has something for the key & its value is truthy. Takes only list & key & only returns true or false. 23 22 24 Finally, TestHashItem has before the other 3 arguments a callable function argument to allow one to create a custom test to be run in addition to testing if the hash map contains the key. -
waj-copyright-year/trunk/vendor/waughj/test-hash-item/src/TestHashItem.php
r1963099 r2010122 6 6 function TestHashItemExists( array $list, string $key, $fallback = null ) 7 7 { 8 return ( is_array( $list ) && isset( $list[ $key ]) ) ? $list[ $key ] : $fallback;8 return ( array_key_exists( $key, $list ) ) ? $list[ $key ] : $fallback; 9 9 } 10 10 … … 48 48 } 49 49 50 function TestHashItemIsTrue( array $list, string $key ) : bool 51 { 52 return TestHashItemExists( $list, $key ) && $list[ $key ]; 53 } 54 50 55 function TestHashItem( callable $function, array $list, string $key, $fallback = null ) 51 56 { -
waj-copyright-year/trunk/vendor/waughj/test-hash-item/tests/TestHashItemTest.php
r1963099 r2010122 9 9 use function \WaughJ\TestHashItem\TestHashItemObject; 10 10 use function \WaughJ\TestHashItem\TestHashItemClass; 11 use function \WaughJ\TestHashItem\TestHashItemIsTrue; 11 12 12 13 class TestHashItemTest extends TestCase … … 72 73 $this->assertEquals( TestHashItemClass( 'Date', $list, 'date-obj', null ), null ); 73 74 } 75 76 public function testItemIsTrue() : void 77 { 78 $switch1 = [ 'value' => true ]; 79 $switch2 = [ 'value' => 1 ]; 80 $switch3 = [ 'value' => 0 ]; 81 $switch4 = [ 'value' => 'afdafsaf' ]; 82 $switch5 = [ 'value' => '' ]; 83 $switch6 = [ 'value' => null ]; 84 $switch7 = [ 'value' => false ]; 85 $this->assertEquals( TestHashItemIsTrue( $switch1, 'value' ), true ); 86 $this->assertEquals( TestHashItemIsTrue( $switch2, 'value' ), true ); 87 $this->assertEquals( TestHashItemIsTrue( $switch3, 'value' ), false ); 88 $this->assertEquals( TestHashItemIsTrue( $switch4, 'value' ), true ); 89 $this->assertEquals( TestHashItemIsTrue( $switch5, 'value' ), false ); 90 $this->assertEquals( TestHashItemIsTrue( $switch6, 'value' ), false ); 91 $this->assertEquals( TestHashItemIsTrue( $switch7, 'value' ), false ); 92 } 74 93 }
Note: See TracChangeset
for help on using the changeset viewer.